chore(format): Prettier über das gesamte Repo
ci / quality (push) Failing after 45s
ci / build (push) Has been skipped
deploy / deploy (push) Successful in 53s

Behebt die rote CI (format:check schlug an 36 Alt-Bestand-Dateien fehl:
migrations/meta-Snapshots, seed.ts, schemas/lead.ts, README u. a.) und erzwingt
nebenbei einen frischen web-Build beim Auto-Deploy (apps/web-Dateien geaendert
-> COPY-Layer invalidiert -> Vite baut neu).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Raffael SheikhandClaude Opus 4.8 committed 2026-06-07 17:50:07 +02:00
1 parent b340b45110
commit a1cf6f3883
36 files changed
+1559 -3510

No files matched your search

+77 -76
View File
@@ -8,15 +8,15 @@ Internes Web-Tool von **ToolCTRL** für den täglichen Überblick über alle Pro
## Was die App tut
| Bereich | Feature |
|---|---|
| **Dashboard** (`/dashboard`) | Unternehmens-Übersicht: Bereichs-Ampelstatus, **Showstopper** (offene Showstopper-Risiken), **Projekte in Eskalation/Taskforce**, „Heute fehlt"-Liste, bereichsübergreifende Blocker, Pflicht-Minimum-Übersicht, Jourfixe-Hinweis, „Heute im Team" (ToDos), „Zeit im Team heute" (Live-Tracking, Wall-Clock), Vortags-Feed |
| **Bereich** (`/bereich`, `/bereich/<slug>`) | Tab-Switcher Entwicklung / Vertrieb / Marketing — Projekt-Liste (Kundenprojekte / Interne Projekte) mit Pflicht-Minimum- & Modus-Indicator. **Vertrieb** zusätzlich: Lead-Teaser + „Projekte mit Vertriebsaktivität" (bereichsübergreifend) |
| **Projekt** (`/projekt/:id`) | Detail: Ziel/Maxime/Nicht-Ziele/Liefergegenstände + Zieldreieck, **Phasen-Lebenszyklus mit Gate-Reviews**, **Statusbericht** (Ampel/Trend + Verlauf), **Stakeholder-Matrix**, **Risiko- & Chancen-Register**, **verknüpfte Leads**, **Änderungs-Log**, Verlinkungen, Pflicht-Minimum, Meilensteine (mit Ergebnis/Kundennutzen + Datums-Warnung), DoD, Projekt-Abschluss (Checkliste + Vermerk, P1), Projekt-Modus |
| **Leads** (`/leads`, `/lead/:id`) | Vertriebs-CRM: Lead-Liste nach Status (Cold/Warm/Hot/Won/Lost), Dossier (Stammdaten, Pain & Bedarf, Soft Factors, Strategie), Kontaktpersonen, Austausch-Log, **CSV-Import**, Lead→Deal-Promotion, **Projekt-Verknüpfung** |
| **Heute** (`/heute`) | Tagesrhythmus: Lock-in mit ToDo-Liste, Auto-Carryover offener ToDos vom Vortag, **ToDos mitten am Tag hinzufügen**, Timer pro ToDo, Zeiterfassungs-Timeline mit Edit/Delete/Nachtrag |
| **Reflexion** (`/reflexion`) | Abend-Reflexion: ToDos abhaken + **Titel inline korrigieren**, Freitext, Ampel + Trend, optional Blocker. Editierbar bis 00:00 Berlin |
| **Archiv** (`/archiv`) | Abgeschlossene Projekte, gruppiert nach Bereich |
| Bereich | Feature |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Dashboard** (`/dashboard`) | Unternehmens-Übersicht: Bereichs-Ampelstatus, **Showstopper** (offene Showstopper-Risiken), **Projekte in Eskalation/Taskforce**, „Heute fehlt"-Liste, bereichsübergreifende Blocker, Pflicht-Minimum-Übersicht, Jourfixe-Hinweis, „Heute im Team" (ToDos), „Zeit im Team heute" (Live-Tracking, Wall-Clock), Vortags-Feed |
| **Bereich** (`/bereich`, `/bereich/<slug>`) | Tab-Switcher Entwicklung / Vertrieb / Marketing — Projekt-Liste (Kundenprojekte / Interne Projekte) mit Pflicht-Minimum- & Modus-Indicator. **Vertrieb** zusätzlich: Lead-Teaser + „Projekte mit Vertriebsaktivität" (bereichsübergreifend) |
| **Projekt** (`/projekt/:id`) | Detail: Ziel/Maxime/Nicht-Ziele/Liefergegenstände + Zieldreieck, **Phasen-Lebenszyklus mit Gate-Reviews**, **Statusbericht** (Ampel/Trend + Verlauf), **Stakeholder-Matrix**, **Risiko- & Chancen-Register**, **verknüpfte Leads**, **Änderungs-Log**, Verlinkungen, Pflicht-Minimum, Meilensteine (mit Ergebnis/Kundennutzen + Datums-Warnung), DoD, Projekt-Abschluss (Checkliste + Vermerk, P1), Projekt-Modus |
| **Leads** (`/leads`, `/lead/:id`) | Vertriebs-CRM: Lead-Liste nach Status (Cold/Warm/Hot/Won/Lost), Dossier (Stammdaten, Pain & Bedarf, Soft Factors, Strategie), Kontaktpersonen, Austausch-Log, **CSV-Import**, Lead→Deal-Promotion, **Projekt-Verknüpfung** |
| **Heute** (`/heute`) | Tagesrhythmus: Lock-in mit ToDo-Liste, Auto-Carryover offener ToDos vom Vortag, **ToDos mitten am Tag hinzufügen**, Timer pro ToDo, Zeiterfassungs-Timeline mit Edit/Delete/Nachtrag |
| **Reflexion** (`/reflexion`) | Abend-Reflexion: ToDos abhaken + **Titel inline korrigieren**, Freitext, Ampel + Trend, optional Blocker. Editierbar bis 00:00 Berlin |
| **Archiv** (`/archiv`) | Abgeschlossene Projekte, gruppiert nach Bereich |
**Querschnittsfunktionen**
@@ -32,23 +32,23 @@ Internes Web-Tool von **ToolCTRL** für den täglichen Überblick über alle Pro
## Tech Stack
| Layer | Wahl |
|---|---|
| Sprache | **TypeScript** strict, ESM überall |
| Repo-Layout | **pnpm**-Monorepo (`pnpm-workspace.yaml`) |
| Node | **22+** |
| Frontend | **Vite 5 + React 18 + Tailwind 4 + React Router 7 + React Query 5 + Sonner** (Toasts) + **lucide-react** (Icons) |
| Backend | **Fastify 5 + tRPC v11** (`@trpc/server/adapters/fastify`) |
| ORM | **Drizzle 0.38** + **drizzle-kit** |
| Datenbank | **Postgres 16** |
| Auth | **Authentik OIDC** via `openid-client v6` (Auth Code + PKCE), Session-Cookies HttpOnly+SameSite=Lax, Sessions in Postgres |
| Validation | **Zod 3** (geteilt zwischen FE und BE via `@cockpit/shared`) |
| Logging | **pino** (Fastify-built-in) |
| Styling | Tailwind 4 + CSS-Custom-Properties · Hausschrift **Space Grotesk** (selbst gehostet) · Keycap-Button-Stil |
| Tests | **Vitest** (Unit + tRPC) |
| Reverse-Proxy | **Caddy 2** (siehe `Caddyfile`) |
| CI | **Gitea Actions** (`.gitea/workflows/ci.yml`) |
| Deployment | **Docker Compose** (`docker-compose.yml`) auf ToolCTRL-interner Infra |
| Layer | Wahl |
| ------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Sprache | **TypeScript** strict, ESM überall |
| Repo-Layout | **pnpm**-Monorepo (`pnpm-workspace.yaml`) |
| Node | **22+** |
| Frontend | **Vite 5 + React 18 + Tailwind 4 + React Router 7 + React Query 5 + Sonner** (Toasts) + **lucide-react** (Icons) |
| Backend | **Fastify 5 + tRPC v11** (`@trpc/server/adapters/fastify`) |
| ORM | **Drizzle 0.38** + **drizzle-kit** |
| Datenbank | **Postgres 16** |
| Auth | **Authentik OIDC** via `openid-client v6` (Auth Code + PKCE), Session-Cookies HttpOnly+SameSite=Lax, Sessions in Postgres |
| Validation | **Zod 3** (geteilt zwischen FE und BE via `@cockpit/shared`) |
| Logging | **pino** (Fastify-built-in) |
| Styling | Tailwind 4 + CSS-Custom-Properties · Hausschrift **Space Grotesk** (selbst gehostet) · Keycap-Button-Stil |
| Tests | **Vitest** (Unit + tRPC) |
| Reverse-Proxy | **Caddy 2** (siehe `Caddyfile`) |
| CI | **Gitea Actions** (`.gitea/workflows/ci.yml`) |
| Deployment | **Docker Compose** (`docker-compose.yml`) auf ToolCTRL-interner Infra |
⚠️ **Namespace-Hinweis**: Die internen pnpm-Packages heißen `@cockpit/*` (Historie), die App selbst heißt **everythingbutwork**. Nicht umbenennen — das würde unzählige Imports brechen ohne Mehrwert.
@@ -153,11 +153,11 @@ Im Dev-Modus läuft ein **Auto-Login** als Admin-User `dejan@tool-ctrl.de`. Auth
### Wichtige Ports
| Service | Port | Quelle |
|---|---|---|
| Vite Dev-Server | **7173** | `apps/web/vite.config.ts` |
| Fastify API | **7100** | `.env` (`PORT`) |
| Postgres (Dev) | **55432** | `docker-compose.dev.yml` (5432 würde mit Mac-System-Postgres kollidieren) |
| Service | Port | Quelle |
| --------------- | --------- | ------------------------------------------------------------------------- |
| Vite Dev-Server | **7173** | `apps/web/vite.config.ts` |
| Fastify API | **7100** | `.env` (`PORT`) |
| Postgres (Dev) | **55432** | `docker-compose.dev.yml` (5432 würde mit Mac-System-Postgres kollidieren) |
### Häufig genutzte Scripts
@@ -178,29 +178,29 @@ Postgres 16, Drizzle als ORM und Migrator. **Schema-Single-Source-of-Truth**: `p
### Tabellen (aktueller Stand nach Migration 0011)
| Tabelle | Zweck |
|---|---|
| `user` | Mitarbeiter (`authentik_sub` als Identitäts-Anker), `is_admin`-Flag |
| `session` | Server-Side Sessions (Postgres-persistent), Browser kennt nur Cookie-`id` |
| `audit_event` | Audit-Trail (Tabelle vorhanden; `withAudit`-Wrapper aktuell nicht verdrahtet) |
| `area` | Bereich (entwicklung / vertrieb / marketing / allgemein) |
| `project` | Projekt: Name, `description`, `maxime`, `ziel`/`nicht_ziele`/`liefergegenstaende`, `zieldreieck_flex`, `modus`, `phase`, Outline-/Plane-URLs, Arbeitsmodus, `pflicht_minimum_state` JSONB, Status-/Trend-Cache, `abschlussvermerk`, Archiv-Felder |
| `milestone` | Cockpit-Sicht-Meilenstein pro Projekt (+ `ergebnis`, `kundennutzen`) |
| `project_status` | Statusbericht-Historie pro Projekt (Ampel/Trend/Text, extern-Flag) |
| `phase_gate` | Gate-Review am Phasenende (Ergebnis erreicht? + Notiz) |
| `change_entry` | Änderungs-Log pro Projekt (Scope-Creep) |
| `stakeholder` | Stakeholder-Analyse pro Projekt (Interesse × Einfluss, Haltung) |
| `risk` | Risiko- & Chancen-Register pro Projekt (W×A, Showstopper, Owner, Strategie) |
| `day_entry` | Tageseintrag (begun / full / absent), `published_at` für Vortrags-Veröffentlichung |
| `todo` | Tagesplan-Item, optional an Bezug gebunden, `carried_over`-Flag |
| `absence_day` | Urlaub/Krank/Sonstiges — zählt nicht gegen Streak |
| `blocker` | Bereichsübergreifendes Hindernis |
| `lead` | Vertriebs-Lead-Dossier; optionale `project_id`-Verknüpfung zum (universellen) Projekt |
| `lead_contact` | Kontaktperson(en) eines Leads |
| `lead_touchpoint` | Austausch-Log eines Leads (Kanal, Outcome, Follow-up) |
| `deal` | Pipeline-Deal; wird per Lead→Deal-Promotion erzeugt |
| `gtm_step`, `campaign`, `lead_handover` | Im Schema vorhanden (Phase-2-Vorbereitung), kein UI |
| `time_entry` | Zeiterfassungs-Block, optional an ToDo gebunden, Partial-Unique-Index erzwingt max. einen aktiven Timer pro User |
| Tabelle | Zweck |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `user` | Mitarbeiter (`authentik_sub` als Identitäts-Anker), `is_admin`-Flag |
| `session` | Server-Side Sessions (Postgres-persistent), Browser kennt nur Cookie-`id` |
| `audit_event` | Audit-Trail (Tabelle vorhanden; `withAudit`-Wrapper aktuell nicht verdrahtet) |
| `area` | Bereich (entwicklung / vertrieb / marketing / allgemein) |
| `project` | Projekt: Name, `description`, `maxime`, `ziel`/`nicht_ziele`/`liefergegenstaende`, `zieldreieck_flex`, `modus`, `phase`, Outline-/Plane-URLs, Arbeitsmodus, `pflicht_minimum_state` JSONB, Status-/Trend-Cache, `abschlussvermerk`, Archiv-Felder |
| `milestone` | Cockpit-Sicht-Meilenstein pro Projekt (+ `ergebnis`, `kundennutzen`) |
| `project_status` | Statusbericht-Historie pro Projekt (Ampel/Trend/Text, extern-Flag) |
| `phase_gate` | Gate-Review am Phasenende (Ergebnis erreicht? + Notiz) |
| `change_entry` | Änderungs-Log pro Projekt (Scope-Creep) |
| `stakeholder` | Stakeholder-Analyse pro Projekt (Interesse × Einfluss, Haltung) |
| `risk` | Risiko- & Chancen-Register pro Projekt (W×A, Showstopper, Owner, Strategie) |
| `day_entry` | Tageseintrag (begun / full / absent), `published_at` für Vortrags-Veröffentlichung |
| `todo` | Tagesplan-Item, optional an Bezug gebunden, `carried_over`-Flag |
| `absence_day` | Urlaub/Krank/Sonstiges — zählt nicht gegen Streak |
| `blocker` | Bereichsübergreifendes Hindernis |
| `lead` | Vertriebs-Lead-Dossier; optionale `project_id`-Verknüpfung zum (universellen) Projekt |
| `lead_contact` | Kontaktperson(en) eines Leads |
| `lead_touchpoint` | Austausch-Log eines Leads (Kanal, Outcome, Follow-up) |
| `deal` | Pipeline-Deal; wird per Lead→Deal-Promotion erzeugt |
| `gtm_step`, `campaign`, `lead_handover` | Im Schema vorhanden (Phase-2-Vorbereitung), kein UI |
| `time_entry` | Zeiterfassungs-Block, optional an ToDo gebunden, Partial-Unique-Index erzwingt max. einen aktiven Timer pro User |
Migrationen liegen in `packages/db/migrations/*.sql` und werden über `drizzle-kit migrate` angewendet. Schema-Änderungen brauchen **immer eine neue Migration** — kein Schema-Drift.
@@ -210,16 +210,16 @@ Migrationen liegen in `packages/db/migrations/*.sql` und werden über `drizzle-k
### REST-Routen (Fastify)
| Methode | Pfad | Zweck |
|---|---|---|
| `GET` | `/api/health` | DB- und Authentik-Reachability-Check |
| `GET` | `/api/me` | Eingeloggter User (oder 401) |
| `GET` | `/api/auth/login` | Startet OIDC-Flow (Redirect zu Authentik) |
| `GET` | `/api/auth/callback` | Code-Exchange + Session-Create |
| `POST` | `/api/auth/logout` | Session löschen + Cookie clearen |
| `GET\|POST` | `/api/auth/dev-login` | **Nur Dev-Modus**: Auto-Login als Dejan |
| `POST` | `/trpc/<procedurePath>` | tRPC-Endpunkt (Batch + Stream) |
| `POST` | `/internal/cron/<job>` | Bearer-Token-geschützt: publish-day-entries, recompute-streaks, recompute-pflicht-minimum-5, pg-dump-backup |
| Methode | Pfad | Zweck |
| ----------- | ----------------------- | ----------------------------------------------------------------------------------------------------------- |
| `GET` | `/api/health` | DB- und Authentik-Reachability-Check |
| `GET` | `/api/me` | Eingeloggter User (oder 401) |
| `GET` | `/api/auth/login` | Startet OIDC-Flow (Redirect zu Authentik) |
| `GET` | `/api/auth/callback` | Code-Exchange + Session-Create |
| `POST` | `/api/auth/logout` | Session löschen + Cookie clearen |
| `GET\|POST` | `/api/auth/dev-login` | **Nur Dev-Modus**: Auto-Login als Dejan |
| `POST` | `/trpc/<procedurePath>` | tRPC-Endpunkt (Batch + Stream) |
| `POST` | `/internal/cron/<job>` | Bearer-Token-geschützt: publish-day-entries, recompute-streaks, recompute-pflicht-minimum-5, pg-dump-backup |
### tRPC-Router (`apps/api/src/routers/_app.ts`)
@@ -359,12 +359,12 @@ Konstanten (`MAX_TODO_TEXT_LENGTH`, `WERKTAGE`, `JOURFIXE_DAY`, `REFLEXION_REMIN
`docker-compose.yml` definiert vier Services:
| Service | Image | Rolle |
|---|---|---|
| `postgres` | `postgres:16-alpine` | DB, persistentes Volume `cockpit_postgres_data`, Backups in `cockpit_backups` |
| `api` | Build aus `apps/api/Dockerfile` | Fastify auf 3000, hängt an Postgres-Health |
| `web` | Build aus `apps/web/Dockerfile` | Vite-Build wird in `cockpit_web_dist`-Volume gelegt |
| `caddy` | `caddy:2-alpine` | Reverse-Proxy (80+443), TLS via Let's Encrypt, Caddyfile mountet |
| Service | Image | Rolle |
| ---------- | ------------------------------- | ----------------------------------------------------------------------------- |
| `postgres` | `postgres:16-alpine` | DB, persistentes Volume `cockpit_postgres_data`, Backups in `cockpit_backups` |
| `api` | Build aus `apps/api/Dockerfile` | Fastify auf 3000, hängt an Postgres-Health |
| `web` | Build aus `apps/web/Dockerfile` | Vite-Build wird in `cockpit_web_dist`-Volume gelegt |
| `caddy` | `caddy:2-alpine` | Reverse-Proxy (80+443), TLS via Let's Encrypt, Caddyfile mountet |
Env-Variablen werden über `.env.production` injiziert. Required: `POSTGRES_PASSWORD`, `SESSION_COOKIE_SECRET` (mind. 32 Z.), `CRON_BEARER_TOKEN`, `AUTHENTIK_*`.
@@ -392,6 +392,7 @@ build → install, web build, api build (needs quality)
`.gitea/workflows/deploy.yml` (Runner `runs-on: host` auf dem Homeserver): **bei jedem Push auf `main`** → `git reset --hard origin/main`, `docker compose up -d --build`, dann Warten bis `cockpit-api` healthy. Es gibt **keinen manuellen Trigger** — ein (ggf. leerer) Push löst den Deploy aus.
**Startup-Verhalten der API** (`apps/api/src/server.ts`): vor dem Listen wird
1. `runMigrations()` ausgeführt (Drizzle-Migrationen idempotent; schlägt eine fehl, startet die API nicht), dann
2. `ensureBaseAreas()` (legt die 4 Basis-Bereiche idempotent an, damit z. B. der „Neues Projekt"-Dropdown nie leer ist — auch auf einer nicht geseedeten Prod-DB).
@@ -434,12 +435,12 @@ Vollständige PRD/Architektur/UX/Stories im `_bmad-output/planning-artifacts/`-O
- Ursprüngliche User Journeys
- Anti-Ziele und Roadmap-Hinweise
| Datei | Inhalt |
|---|---|
| `prds/prd-projectmanagement-2026-05-25/prd.md` | PRD (49 FRs, 16 NFRs) |
| `architecture.md` | Stack-Entscheidungen, Patterns |
| `ux-design-specification.md` | Brand-Tokens, Komponenten, Voice & Tone |
| `epics.md` | 6 Epics, 32 Stories |
| Datei | Inhalt |
| ---------------------------------------------- | --------------------------------------- |
| `prds/prd-projectmanagement-2026-05-25/prd.md` | PRD (49 FRs, 16 NFRs) |
| `architecture.md` | Stack-Entscheidungen, Patterns |
| `ux-design-specification.md` | Brand-Tokens, Komponenten, Voice & Tone |
| `epics.md` | 6 Epics, 32 Stories |
---
+7 -2
View File
@@ -111,13 +111,18 @@ export async function registerAuthRoutes(app: FastifyInstance): Promise<void> {
// die App ohne Authentik durchnavigierbar ist. Authentik kommt in der späteren
// Roadmap. Nur aktiv bei NODE_ENV=development.
if (env.NODE_ENV === 'development') {
const handler = async (req: import('fastify').FastifyRequest, reply: import('fastify').FastifyReply) => {
const handler = async (
req: import('fastify').FastifyRequest,
reply: import('fastify').FastifyReply,
) => {
const { getDb } = await import('../db.js');
const { user } = await import('@cockpit/db');
const { eq } = await import('drizzle-orm');
const { db } = getDb();
const found = (await db.select().from(user).where(eq(user.email, 'dejan@tool-ctrl.de')).limit(1))[0];
const found = (
await db.select().from(user).where(eq(user.email, 'dejan@tool-ctrl.de')).limit(1)
)[0];
const userRow = found
? found
: await upsertUserFromOidc({
+4 -1
View File
@@ -47,7 +47,10 @@ async function safeText(res: Response): Promise<string> {
* Startet ein laufendes Timesheet in Kimai (Clock-In). Liefert die Kimai-
* Timesheet-ID zurück oder null (nicht konfiguriert / Fehler).
*/
export async function kimaiClockIn(opts: { begin: Date; description?: string }): Promise<number | null> {
export async function kimaiClockIn(opts: {
begin: Date;
description?: string;
}): Promise<number | null> {
const cfg = kimaiConfig();
if (!cfg) {
logger.debug('kimai not configured — clock-in skipped');
+2 -1
View File
@@ -41,7 +41,8 @@ export const changeRouter = router({
const existing = (
await ctx.db.select().from(changeEntry).where(eq(changeEntry.id, id)).limit(1)
)[0];
if (!existing) throw new TRPCError({ code: 'NOT_FOUND', message: 'Eintrag nicht gefunden.' });
if (!existing)
throw new TRPCError({ code: 'NOT_FOUND', message: 'Eintrag nicht gefunden.' });
return existing;
}
const [updated] = await ctx.db
+77 -67
View File
@@ -1,5 +1,15 @@
import { and, eq, ne, isNull, isNotNull, lt, count, asc, desc } from 'drizzle-orm';
import { area, project, blocker, dayEntry, user, risk, milestone, type Area, type Project } from '@cockpit/db';
import {
area,
project,
blocker,
dayEntry,
user,
risk,
milestone,
type Area,
type Project,
} from '@cockpit/db';
import { router, protectedProcedure } from '../trpc.js';
import { todayIso, previousWerktag } from '../lib/werktag.js';
import { aggregateAreaAmpel } from '../lib/ampel.js';
@@ -17,73 +27,73 @@ export const dashboardRouter = router({
showstopperRows,
milestoneRows,
] = await Promise.all([
ctx.db.select().from(area).orderBy(area.order),
ctx.db.select().from(project).where(eq(project.archiviert, false)),
ctx.db.select().from(blocker).where(isNull(blocker.resolvedAt)),
ctx.db
.select({ userId: dayEntry.userId, status: dayEntry.status })
.from(dayEntry)
.where(eq(dayEntry.date, todayDate)),
ctx.db.select({ c: count() }).from(user).where(eq(user.active, true)),
ctx.db
.select({
id: dayEntry.id,
userId: dayEntry.userId,
userName: user.name,
date: dayEntry.date,
ampel: dayEntry.ampel,
trend: dayEntry.trend,
reflectionText: dayEntry.reflectionText,
publishedAt: dayEntry.publishedAt,
})
.from(dayEntry)
.innerJoin(user, eq(user.id, dayEntry.userId))
// „Gestern im Team": volle Reflexionen vor heute (heutige bleiben privat
// bis morgen). Unabhängig vom publish-Cron.
.where(and(lt(dayEntry.date, todayDate), eq(dayEntry.status, 'full')))
.orderBy(desc(dayEntry.date), desc(dayEntry.reflectedAt))
.limit(50),
ctx.db
.select({
id: risk.id,
title: risk.title,
projectId: risk.projectId,
projectName: project.name,
})
.from(risk)
.innerJoin(project, eq(project.id, risk.projectId))
.where(
and(
eq(risk.showstopper, true),
eq(risk.kind, 'risiko'),
ne(risk.status, 'geschlossen'),
eq(project.archiviert, false),
),
ctx.db.select().from(area).orderBy(area.order),
ctx.db.select().from(project).where(eq(project.archiviert, false)),
ctx.db.select().from(blocker).where(isNull(blocker.resolvedAt)),
ctx.db
.select({ userId: dayEntry.userId, status: dayEntry.status })
.from(dayEntry)
.where(eq(dayEntry.date, todayDate)),
ctx.db.select({ c: count() }).from(user).where(eq(user.active, true)),
ctx.db
.select({
id: dayEntry.id,
userId: dayEntry.userId,
userName: user.name,
date: dayEntry.date,
ampel: dayEntry.ampel,
trend: dayEntry.trend,
reflectionText: dayEntry.reflectionText,
publishedAt: dayEntry.publishedAt,
})
.from(dayEntry)
.innerJoin(user, eq(user.id, dayEntry.userId))
// „Gestern im Team": volle Reflexionen vor heute (heutige bleiben privat
// bis morgen). Unabhängig vom publish-Cron.
.where(and(lt(dayEntry.date, todayDate), eq(dayEntry.status, 'full')))
.orderBy(desc(dayEntry.date), desc(dayEntry.reflectedAt))
.limit(50),
ctx.db
.select({
id: risk.id,
title: risk.title,
projectId: risk.projectId,
projectName: project.name,
})
.from(risk)
.innerJoin(project, eq(project.id, risk.projectId))
.where(
and(
eq(risk.showstopper, true),
eq(risk.kind, 'risiko'),
ne(risk.status, 'geschlossen'),
eq(project.archiviert, false),
),
// Anstehende Meilensteine (offen/überfällig, mit Datum) projektübergreifend.
ctx.db
.select({
id: milestone.id,
title: milestone.title,
due: milestone.due,
status: milestone.status,
projectId: milestone.projectId,
projectName: project.name,
projectLogoUrl: project.logoUrl,
areaId: project.areaId,
})
.from(milestone)
.innerJoin(project, eq(project.id, milestone.projectId))
.where(
and(
ne(milestone.status, 'done'),
isNotNull(milestone.due),
eq(project.archiviert, false),
),
)
.orderBy(asc(milestone.due))
.limit(15),
]);
),
// Anstehende Meilensteine (offen/überfällig, mit Datum) projektübergreifend.
ctx.db
.select({
id: milestone.id,
title: milestone.title,
due: milestone.due,
status: milestone.status,
projectId: milestone.projectId,
projectName: project.name,
projectLogoUrl: project.logoUrl,
areaId: project.areaId,
})
.from(milestone)
.innerJoin(project, eq(project.id, milestone.projectId))
.where(
and(
ne(milestone.status, 'done'),
isNotNull(milestone.due),
eq(project.archiviert, false),
),
)
.orderBy(asc(milestone.due))
.limit(15),
]);
const projectsByArea = new Map<string, Project[]>();
for (const p of allProjects) {
+1 -2
View File
@@ -65,8 +65,7 @@ export const dealRouter = router({
enteredStageAt: new Date(),
wonAt: input.stage === 'abschluss' ? new Date() : null,
// Gewonnener Deal = voller Auftragswert (nicht mit Wahrscheinlichkeit gewichtet).
wonValueEur:
input.stage === 'abschluss' ? sql`COALESCE(${deal.valueEur}, 0)` : null,
wonValueEur: input.stage === 'abschluss' ? sql`COALESCE(${deal.valueEur}, 0)` : null,
})
.where(eq(deal.id, input.dealId))
.returning();
+39 -45
View File
@@ -15,51 +15,45 @@ export const riskRouter = router({
.orderBy(desc(risk.showstopper), desc(risk.createdAt));
}),
create: protectedProcedure
.input(RiskSchemas.createRiskInput)
.mutation(async ({ ctx, input }) => {
const [created] = await ctx.db
.insert(risk)
.values({
projectId: input.projectId,
kind: input.kind,
title: input.title,
wahrscheinlichkeit: input.wahrscheinlichkeit,
auswirkung: input.auswirkung,
herkunft: input.herkunft ?? null,
showstopper: input.showstopper,
massnahme: input.massnahme ?? null,
strategie: input.strategie ?? null,
ownerUserId: input.ownerUserId ?? null,
status: input.status,
createdBy: ctx.user.id,
})
.returning();
return created;
}),
create: protectedProcedure.input(RiskSchemas.createRiskInput).mutation(async ({ ctx, input }) => {
const [created] = await ctx.db
.insert(risk)
.values({
projectId: input.projectId,
kind: input.kind,
title: input.title,
wahrscheinlichkeit: input.wahrscheinlichkeit,
auswirkung: input.auswirkung,
herkunft: input.herkunft ?? null,
showstopper: input.showstopper,
massnahme: input.massnahme ?? null,
strategie: input.strategie ?? null,
ownerUserId: input.ownerUserId ?? null,
status: input.status,
createdBy: ctx.user.id,
})
.returning();
return created;
}),
update: protectedProcedure
.input(RiskSchemas.updateRiskInput)
.mutation(async ({ ctx, input }) => {
const { id, ...patch } = input;
if (Object.keys(patch).length === 0) {
const existing = (await ctx.db.select().from(risk).where(eq(risk.id, id)).limit(1))[0];
if (!existing) throw new TRPCError({ code: 'NOT_FOUND', message: 'Eintrag nicht gefunden.' });
return existing;
}
const [updated] = await ctx.db
.update(risk)
.set({ ...patch, updatedAt: new Date() })
.where(eq(risk.id, id))
.returning();
if (!updated) throw new TRPCError({ code: 'NOT_FOUND', message: 'Eintrag nicht gefunden.' });
return updated;
}),
update: protectedProcedure.input(RiskSchemas.updateRiskInput).mutation(async ({ ctx, input }) => {
const { id, ...patch } = input;
if (Object.keys(patch).length === 0) {
const existing = (await ctx.db.select().from(risk).where(eq(risk.id, id)).limit(1))[0];
if (!existing) throw new TRPCError({ code: 'NOT_FOUND', message: 'Eintrag nicht gefunden.' });
return existing;
}
const [updated] = await ctx.db
.update(risk)
.set({ ...patch, updatedAt: new Date() })
.where(eq(risk.id, id))
.returning();
if (!updated) throw new TRPCError({ code: 'NOT_FOUND', message: 'Eintrag nicht gefunden.' });
return updated;
}),
remove: protectedProcedure
.input(RiskSchemas.removeRiskInput)
.mutation(async ({ ctx, input }) => {
await ctx.db.delete(risk).where(eq(risk.id, input.id));
return { ok: true as const };
}),
remove: protectedProcedure.input(RiskSchemas.removeRiskInput).mutation(async ({ ctx, input }) => {
await ctx.db.delete(risk).where(eq(risk.id, input.id));
return { ok: true as const };
}),
});
+4 -2
View File
@@ -50,7 +50,8 @@ export const stakeholderRouter = router({
const existing = (
await ctx.db.select().from(stakeholder).where(eq(stakeholder.id, id)).limit(1)
)[0];
if (!existing) throw new TRPCError({ code: 'NOT_FOUND', message: 'Stakeholder nicht gefunden.' });
if (!existing)
throw new TRPCError({ code: 'NOT_FOUND', message: 'Stakeholder nicht gefunden.' });
return existing;
}
const [updated] = await ctx.db
@@ -58,7 +59,8 @@ export const stakeholderRouter = router({
.set(patch)
.where(eq(stakeholder.id, id))
.returning();
if (!updated) throw new TRPCError({ code: 'NOT_FOUND', message: 'Stakeholder nicht gefunden.' });
if (!updated)
throw new TRPCError({ code: 'NOT_FOUND', message: 'Stakeholder nicht gefunden.' });
return updated;
}),
@@ -120,7 +120,9 @@ export function LogoUpload({
{error ? (
<span className="text-xs text-[var(--color-ampel-red-fg)]">{error}</span>
) : (
<span className="text-xs text-[var(--color-ink-faint)]">Quadratisch, wird auf 256px verkleinert.</span>
<span className="text-xs text-[var(--color-ink-faint)]">
Quadratisch, wird auf 256px verkleinert.
</span>
)}
</div>
<input
@@ -85,7 +85,9 @@ export function TeamTimeSection() {
title="Über parallele Aufgaben getrackte Summe (zählt überlappende Zeit mehrfach)."
>
{' · getrackt '}
<span className="font-mono">{formatDurationCompact(it.trackedSeconds)}</span>
<span className="font-mono">
{formatDurationCompact(it.trackedSeconds)}
</span>
</span>
)}
</p>
@@ -131,18 +133,10 @@ function ActiveLine({
}
function IdleLine() {
return (
<p className="mt-3 text-xs text-[var(--color-ink-faint)]">Aktuell kein Timer.</p>
);
return <p className="mt-3 text-xs text-[var(--color-ink-faint)]">Aktuell kein Timer.</p>;
}
function Breakdown({
byCategory,
total,
}: {
byCategory: Record<string, number>;
total: number;
}) {
function Breakdown({ byCategory, total }: { byCategory: Record<string, number>; total: number }) {
if (total === 0) return null;
const ordered = TIME_CATEGORIES.map((c) => ({
key: c.value,
+3 -1
View File
@@ -243,7 +243,9 @@ function QuickPicker({
<button
key={c.value}
type="button"
onClick={() => onStart({ category: c.value, description: description.trim() || undefined })}
onClick={() =>
onStart({ category: c.value, description: description.trim() || undefined })
}
disabled={pending}
className="flex w-full items-center gap-2 rounded-[var(--radius-md)] px-2 py-1.5 text-left text-sm hover:bg-black/5"
>
+1 -4
View File
@@ -5,10 +5,7 @@ function Root({ className, ...rest }: HTMLAttributes<HTMLDivElement>) {
// Scharfe Kanten, Haarlinien-Rahmen ohne Schatten — ToolCTRL-Website-Stil.
return (
<div
className={clsx(
'bg-[var(--color-surface)] border border-[var(--color-border)]',
className,
)}
className={clsx('bg-[var(--color-surface)] border border-[var(--color-border)]', className)}
{...rest}
/>
);
+1 -4
View File
@@ -2,10 +2,7 @@
export type LeadStatus = 'cold' | 'warm' | 'hot' | 'won' | 'lost';
export const LEAD_STATUS_META: Record<
LeadStatus,
{ label: string; badge: string; dot: string }
> = {
export const LEAD_STATUS_META: Record<LeadStatus, { label: string; badge: string; dot: string }> = {
cold: {
label: 'Cold',
badge: 'bg-black/5 text-[var(--color-ink-muted)]',
+30 -7
View File
@@ -29,8 +29,14 @@ export const MODI: ProjectModus[] = ['relax', 'standard', 'eskalation', 'taskfor
export type Level = 'niedrig' | 'mittel' | 'hoch';
export const LEVEL_META: Record<Level, { label: string; badge: string }> = {
niedrig: { label: 'Niedrig', badge: 'bg-[var(--color-ampel-green-bg)] text-[var(--color-ampel-green-fg)]' },
mittel: { label: 'Mittel', badge: 'bg-[var(--color-ampel-amber-bg)] text-[var(--color-ampel-amber-fg)]' },
niedrig: {
label: 'Niedrig',
badge: 'bg-[var(--color-ampel-green-bg)] text-[var(--color-ampel-green-fg)]',
},
mittel: {
label: 'Mittel',
badge: 'bg-[var(--color-ampel-amber-bg)] text-[var(--color-ampel-amber-fg)]',
},
hoch: { label: 'Hoch', badge: 'bg-[var(--color-ampel-red-bg)] text-[var(--color-ampel-red-fg)]' },
};
export const LEVELS: Level[] = ['niedrig', 'mittel', 'hoch'];
@@ -66,7 +72,10 @@ export type ProjectPhase = 'definition' | 'planung' | 'umsetzung' | 'abschluss';
export const PHASES: ProjectPhase[] = ['definition', 'planung', 'umsetzung', 'abschluss'];
export const PHASE_META: Record<ProjectPhase, { label: string; gateZiel: string }> = {
definition: { label: 'Definition', gateZiel: 'Steckbrief abgestimmt und freigegeben' },
planung: { label: 'Planung', gateZiel: 'Plan steht — Backlog zerlegt, Meilensteine & Risiken erfasst' },
planung: {
label: 'Planung',
gateZiel: 'Plan steht — Backlog zerlegt, Meilensteine & Risiken erfasst',
},
umsetzung: { label: 'Umsetzung', gateZiel: 'Liefergegenstände abgenommen' },
abschluss: { label: 'Abschluss', gateZiel: 'Projekt beendet, Erkenntnisse gesichert' },
};
@@ -86,12 +95,26 @@ export const RISK_STRATEGIE_LABEL: Record<RiskStrategie, string> = {
mindern: 'Mindern',
akzeptieren: 'Akzeptieren',
};
export const RISK_STRATEGIEN: RiskStrategie[] = ['vermeiden', 'verlagern', 'mindern', 'akzeptieren'];
export const RISK_STRATEGIEN: RiskStrategie[] = [
'vermeiden',
'verlagern',
'mindern',
'akzeptieren',
];
export type ChangeEntscheidung = 'offen' | 'genehmigt' | 'abgelehnt';
export const CHANGE_ENTSCHEIDUNG_META: Record<ChangeEntscheidung, { label: string; badge: string }> = {
offen: { label: 'Offen', badge: 'bg-[var(--color-ampel-amber-bg)] text-[var(--color-ampel-amber-fg)]' },
genehmigt: { label: 'Genehmigt', badge: 'bg-[var(--color-ampel-green-bg)] text-[var(--color-ampel-green-fg)]' },
export const CHANGE_ENTSCHEIDUNG_META: Record<
ChangeEntscheidung,
{ label: string; badge: string }
> = {
offen: {
label: 'Offen',
badge: 'bg-[var(--color-ampel-amber-bg)] text-[var(--color-ampel-amber-fg)]',
},
genehmigt: {
label: 'Genehmigt',
badge: 'bg-[var(--color-ampel-green-bg)] text-[var(--color-ampel-green-fg)]',
},
abgelehnt: { label: 'Abgelehnt', badge: 'bg-black/5 text-[var(--color-ink-faint)]' },
};
export const CHANGE_ENTSCHEIDUNGEN: ChangeEntscheidung[] = ['offen', 'genehmigt', 'abgelehnt'];
+10 -3
View File
@@ -106,7 +106,9 @@ export function DashboardRoute() {
{m.ueberfaellig && ' · überfällig'}
</span>
<span className="text-[var(--color-ink-faint)]">·</span>
<span className="text-[var(--color-ink-muted)]">{relativeDays(m.due!, q.data.date)}</span>
<span className="text-[var(--color-ink-muted)]">
{relativeDays(m.due!, q.data.date)}
</span>
</div>
</div>
<Link
@@ -209,7 +211,10 @@ export function DashboardRoute() {
<ul className="space-y-1 text-sm">
{q.data.pflichtMinimumOffen.map((p) => (
<li key={p.id}>
<Link to={`/projekt/${p.id}`} className="inline-flex items-center gap-2 hover:underline">
<Link
to={`/projekt/${p.id}`}
className="inline-flex items-center gap-2 hover:underline"
>
<ProjectLogo url={p.logoUrl} name={p.name} size={20} />
{p.name}
</Link>
@@ -331,7 +336,9 @@ function TeamHeuteSection() {
</span>
</div>
{u.todos.length === 0 ? (
<p className="mt-2 text-xs text-[var(--color-ink-faint)]">Keine ToDos eingetragen.</p>
<p className="mt-2 text-xs text-[var(--color-ink-faint)]">
Keine ToDos eingetragen.
</p>
) : (
<ul className="mt-2 space-y-1.5 text-sm">
{u.todos.map((t) => (
+1 -3
View File
@@ -25,9 +25,7 @@ export function LoginRoute() {
<h1 className="inline-flex items-center gap-2 text-4xl font-bold">
everythingbutwork <ToolCtrlLogo size={32} />
</h1>
<p className="mt-3 text-[var(--color-ink-muted)]">
Internes ToolCTRL-Projektmanagement.
</p>
<p className="mt-3 text-[var(--color-ink-muted)]">Internes ToolCTRL-Projektmanagement.</p>
{error && (
<p
className="mt-4 rounded-[var(--radius-md)] border border-[var(--color-ampel-red-bg)] bg-[var(--color-ampel-red-bg)] px-4 py-2 text-sm text-[var(--color-ampel-red-fg)]"
+10 -3
View File
@@ -114,7 +114,10 @@ function layout(entries: RawEntry[], nowMs: number): { bars: Bar[]; rows: number
export function TeamViewRoute() {
const [date, setDate] = useState(todayStr);
const isToday = date === todayStr;
const q = trpc.time.teamTimeline.useQuery({ date }, { refetchInterval: isToday ? 30_000 : false });
const q = trpc.time.teamTimeline.useQuery(
{ date },
{ refetchInterval: isToday ? 30_000 : false },
);
// 1-Sekunden-Tick nur heute (für laufende Balken).
const [, setTick] = useState(0);
@@ -148,7 +151,8 @@ export function TeamViewRoute() {
let axisEnd = hasData ? ceilHourMs(Math.max(...allMs)) : axisStart + 2 * 3600_000;
if (axisEnd - axisStart < 2 * 3600_000) axisEnd = axisStart + 2 * 3600_000;
const range = axisEnd - axisStart;
const pct = (ms: number) => ((Math.min(Math.max(ms, axisStart), axisEnd) - axisStart) / range) * 100;
const pct = (ms: number) =>
((Math.min(Math.max(ms, axisStart), axisEnd) - axisStart) / range) * 100;
const hours: number[] = [];
for (let t = axisStart; t <= axisEnd; t += 3600_000) hours.push(t);
@@ -228,7 +232,10 @@ export function TeamViewRoute() {
const { bars, rows } = layout(lane.entries, nowMs);
const laneHeight = rows * BAR_H + (rows - 1) * GAP;
return (
<div key={lane.userId} className="flex items-stretch border-t border-[var(--color-border)] py-1.5">
<div
key={lane.userId}
className="flex items-stretch border-t border-[var(--color-border)] py-1.5"
>
<div className="flex w-40 shrink-0 flex-col justify-center pr-2">
<span className="truncate text-sm font-medium">{lane.name}</span>
<span className="text-[10px] text-[var(--color-ink-muted)]">
+6 -6
View File
@@ -8,9 +8,9 @@
font-weight: 300 700;
font-display: swap;
src: url(/fonts/space-grotesk-latin.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
unicode-range:
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Space Grotesk';
@@ -18,9 +18,9 @@
font-weight: 300 700;
font-display: swap;
src: url(/fonts/space-grotesk-latin-ext.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
unicode-range:
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
U+A720-A7FF;
}
+43 -127
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -517,12 +497,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -530,12 +506,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -702,12 +674,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -831,12 +799,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -844,12 +808,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -933,12 +893,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -992,12 +948,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1005,12 +957,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1018,12 +966,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1113,12 +1057,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1309,12 +1249,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1322,12 +1258,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1335,12 +1267,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1431,12 +1359,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1577,12 +1501,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1590,12 +1510,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1727,4 +1643,4 @@
"schemas": {},
"tables": {}
}
}
}
+43 -127
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -517,12 +497,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -530,12 +506,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -702,12 +674,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -831,12 +799,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -844,12 +808,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -933,12 +893,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -992,12 +948,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1005,12 +957,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1018,12 +966,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1113,12 +1057,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1309,12 +1249,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1322,12 +1258,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1335,12 +1267,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1431,12 +1359,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1611,12 +1535,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1624,12 +1544,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1761,4 +1677,4 @@
"schemas": {},
"tables": {}
}
}
}
+49 -145
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -517,12 +497,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -530,12 +506,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -702,12 +674,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -831,12 +799,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -844,12 +808,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -933,12 +893,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -992,12 +948,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1005,12 +957,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1018,12 +966,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1113,12 +1057,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1309,12 +1249,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1322,12 +1258,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1335,12 +1267,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1431,12 +1359,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1593,12 +1517,8 @@
"name": "time_entry_user_id_user_id_fk",
"tableFrom": "time_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1606,12 +1526,8 @@
"name": "time_entry_day_entry_id_day_entry_id_fk",
"tableFrom": "time_entry",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1619,12 +1535,8 @@
"name": "time_entry_todo_id_todo_id_fk",
"tableFrom": "time_entry",
"tableTo": "todo",
"columnsFrom": [
"todo_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["todo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1799,12 +1711,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1812,12 +1720,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1949,4 +1853,4 @@
"schemas": {},
"tables": {}
}
}
}
+49 -145
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -517,12 +497,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -530,12 +506,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -702,12 +674,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -831,12 +799,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -844,12 +808,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -933,12 +893,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -992,12 +948,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1005,12 +957,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1018,12 +966,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1113,12 +1057,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1315,12 +1255,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1328,12 +1264,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1341,12 +1273,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1437,12 +1365,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1599,12 +1523,8 @@
"name": "time_entry_user_id_user_id_fk",
"tableFrom": "time_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1612,12 +1532,8 @@
"name": "time_entry_day_entry_id_day_entry_id_fk",
"tableFrom": "time_entry",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1625,12 +1541,8 @@
"name": "time_entry_todo_id_todo_id_fk",
"tableFrom": "time_entry",
"tableTo": "todo",
"columnsFrom": [
"todo_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["todo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1805,12 +1717,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1818,12 +1726,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1955,4 +1859,4 @@
"schemas": {},
"tables": {}
}
}
}
+63 -187
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -517,12 +497,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -530,12 +506,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -702,12 +674,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -831,12 +799,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -844,12 +808,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -933,12 +893,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1256,12 +1212,8 @@
"name": "lead_area_id_area_id_fk",
"tableFrom": "lead",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1269,12 +1221,8 @@
"name": "lead_owner_user_id_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1282,12 +1230,8 @@
"name": "lead_promoted_deal_id_deal_id_fk",
"tableFrom": "lead",
"tableTo": "deal",
"columnsFrom": [
"promoted_deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["promoted_deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1295,12 +1239,8 @@
"name": "lead_created_by_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1420,12 +1360,8 @@
"name": "lead_contact_lead_id_lead_id_fk",
"tableFrom": "lead_contact",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1479,12 +1415,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1492,12 +1424,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1505,12 +1433,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1619,12 +1543,8 @@
"name": "lead_touchpoint_lead_id_lead_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1632,12 +1552,8 @@
"name": "lead_touchpoint_bearbeiter_user_id_user_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "user",
"columnsFrom": [
"bearbeiter_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["bearbeiter_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1727,12 +1643,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1929,12 +1841,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1942,12 +1850,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1955,12 +1859,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2051,12 +1951,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2213,12 +2109,8 @@
"name": "time_entry_user_id_user_id_fk",
"tableFrom": "time_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2226,12 +2118,8 @@
"name": "time_entry_day_entry_id_day_entry_id_fk",
"tableFrom": "time_entry",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2239,12 +2127,8 @@
"name": "time_entry_todo_id_todo_id_fk",
"tableFrom": "time_entry",
"tableTo": "todo",
"columnsFrom": [
"todo_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["todo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2419,12 +2303,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2432,12 +2312,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2569,4 +2445,4 @@
"schemas": {},
"tables": {}
}
}
}
+69 -205
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -517,12 +497,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -530,12 +506,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -702,12 +674,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -831,12 +799,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -844,12 +808,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -933,12 +893,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1256,12 +1212,8 @@
"name": "lead_area_id_area_id_fk",
"tableFrom": "lead",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1269,12 +1221,8 @@
"name": "lead_owner_user_id_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1282,12 +1230,8 @@
"name": "lead_promoted_deal_id_deal_id_fk",
"tableFrom": "lead",
"tableTo": "deal",
"columnsFrom": [
"promoted_deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["promoted_deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1295,12 +1239,8 @@
"name": "lead_created_by_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1420,12 +1360,8 @@
"name": "lead_contact_lead_id_lead_id_fk",
"tableFrom": "lead_contact",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1479,12 +1415,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1492,12 +1424,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1505,12 +1433,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1619,12 +1543,8 @@
"name": "lead_touchpoint_lead_id_lead_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1632,12 +1552,8 @@
"name": "lead_touchpoint_bearbeiter_user_id_user_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "user",
"columnsFrom": [
"bearbeiter_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["bearbeiter_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1739,12 +1655,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1954,12 +1866,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1967,12 +1875,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1980,12 +1884,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2124,12 +2024,8 @@
"name": "risk_project_id_project_id_fk",
"tableFrom": "risk",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2137,12 +2033,8 @@
"name": "risk_created_by_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2233,12 +2125,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2348,12 +2236,8 @@
"name": "stakeholder_project_id_project_id_fk",
"tableFrom": "stakeholder",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2510,12 +2394,8 @@
"name": "time_entry_user_id_user_id_fk",
"tableFrom": "time_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2523,12 +2403,8 @@
"name": "time_entry_day_entry_id_day_entry_id_fk",
"tableFrom": "time_entry",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2536,12 +2412,8 @@
"name": "time_entry_todo_id_todo_id_fk",
"tableFrom": "time_entry",
"tableTo": "todo",
"columnsFrom": [
"todo_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["todo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2716,12 +2588,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2729,12 +2597,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2866,4 +2730,4 @@
"schemas": {},
"tables": {}
}
}
}
+83 -247
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -517,12 +497,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -530,12 +506,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -618,12 +590,8 @@
"name": "change_entry_project_id_project_id_fk",
"tableFrom": "change_entry",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -631,12 +599,8 @@
"name": "change_entry_created_by_user_id_fk",
"tableFrom": "change_entry",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -803,12 +767,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -932,12 +892,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -945,12 +901,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1034,12 +986,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1357,12 +1305,8 @@
"name": "lead_area_id_area_id_fk",
"tableFrom": "lead",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1370,12 +1314,8 @@
"name": "lead_owner_user_id_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1383,12 +1323,8 @@
"name": "lead_promoted_deal_id_deal_id_fk",
"tableFrom": "lead",
"tableTo": "deal",
"columnsFrom": [
"promoted_deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["promoted_deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1396,12 +1332,8 @@
"name": "lead_created_by_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1521,12 +1453,8 @@
"name": "lead_contact_lead_id_lead_id_fk",
"tableFrom": "lead_contact",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1580,12 +1508,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1593,12 +1517,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1606,12 +1526,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1720,12 +1636,8 @@
"name": "lead_touchpoint_lead_id_lead_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1733,12 +1645,8 @@
"name": "lead_touchpoint_bearbeiter_user_id_user_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "user",
"columnsFrom": [
"bearbeiter_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["bearbeiter_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1840,12 +1748,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1927,12 +1831,8 @@
"name": "phase_gate_project_id_project_id_fk",
"tableFrom": "phase_gate",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1940,12 +1840,8 @@
"name": "phase_gate_reviewed_by_user_id_fk",
"tableFrom": "phase_gate",
"tableTo": "user",
"columnsFrom": [
"reviewed_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["reviewed_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2192,12 +2088,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -2205,12 +2097,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2218,12 +2106,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2312,12 +2196,8 @@
"name": "project_status_project_id_project_id_fk",
"tableFrom": "project_status",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2325,12 +2205,8 @@
"name": "project_status_created_by_user_id_fk",
"tableFrom": "project_status",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2481,12 +2357,8 @@
"name": "risk_project_id_project_id_fk",
"tableFrom": "risk",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2494,12 +2366,8 @@
"name": "risk_owner_user_id_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2507,12 +2375,8 @@
"name": "risk_created_by_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2603,12 +2467,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2718,12 +2578,8 @@
"name": "stakeholder_project_id_project_id_fk",
"tableFrom": "stakeholder",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2880,12 +2736,8 @@
"name": "time_entry_user_id_user_id_fk",
"tableFrom": "time_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2893,12 +2745,8 @@
"name": "time_entry_day_entry_id_day_entry_id_fk",
"tableFrom": "time_entry",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2906,12 +2754,8 @@
"name": "time_entry_todo_id_todo_id_fk",
"tableFrom": "time_entry",
"tableTo": "todo",
"columnsFrom": [
"todo_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["todo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -3086,12 +2930,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3099,12 +2939,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3236,4 +3072,4 @@
"schemas": {},
"tables": {}
}
}
}
+85 -253
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -517,12 +497,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -530,12 +506,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -618,12 +590,8 @@
"name": "change_entry_project_id_project_id_fk",
"tableFrom": "change_entry",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -631,12 +599,8 @@
"name": "change_entry_created_by_user_id_fk",
"tableFrom": "change_entry",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -803,12 +767,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -932,12 +892,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -945,12 +901,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1034,12 +986,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1378,12 +1326,8 @@
"name": "lead_area_id_area_id_fk",
"tableFrom": "lead",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1391,12 +1335,8 @@
"name": "lead_project_id_project_id_fk",
"tableFrom": "lead",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1404,12 +1344,8 @@
"name": "lead_owner_user_id_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1417,12 +1353,8 @@
"name": "lead_promoted_deal_id_deal_id_fk",
"tableFrom": "lead",
"tableTo": "deal",
"columnsFrom": [
"promoted_deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["promoted_deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1430,12 +1362,8 @@
"name": "lead_created_by_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1555,12 +1483,8 @@
"name": "lead_contact_lead_id_lead_id_fk",
"tableFrom": "lead_contact",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1614,12 +1538,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1627,12 +1547,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1640,12 +1556,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1754,12 +1666,8 @@
"name": "lead_touchpoint_lead_id_lead_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1767,12 +1675,8 @@
"name": "lead_touchpoint_bearbeiter_user_id_user_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "user",
"columnsFrom": [
"bearbeiter_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["bearbeiter_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1874,12 +1778,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1961,12 +1861,8 @@
"name": "phase_gate_project_id_project_id_fk",
"tableFrom": "phase_gate",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1974,12 +1870,8 @@
"name": "phase_gate_reviewed_by_user_id_fk",
"tableFrom": "phase_gate",
"tableTo": "user",
"columnsFrom": [
"reviewed_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["reviewed_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2226,12 +2118,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -2239,12 +2127,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2252,12 +2136,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2346,12 +2226,8 @@
"name": "project_status_project_id_project_id_fk",
"tableFrom": "project_status",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2359,12 +2235,8 @@
"name": "project_status_created_by_user_id_fk",
"tableFrom": "project_status",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2515,12 +2387,8 @@
"name": "risk_project_id_project_id_fk",
"tableFrom": "risk",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2528,12 +2396,8 @@
"name": "risk_owner_user_id_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2541,12 +2405,8 @@
"name": "risk_created_by_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2637,12 +2497,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2752,12 +2608,8 @@
"name": "stakeholder_project_id_project_id_fk",
"tableFrom": "stakeholder",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2914,12 +2766,8 @@
"name": "time_entry_user_id_user_id_fk",
"tableFrom": "time_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2927,12 +2775,8 @@
"name": "time_entry_day_entry_id_day_entry_id_fk",
"tableFrom": "time_entry",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2940,12 +2784,8 @@
"name": "time_entry_todo_id_todo_id_fk",
"tableFrom": "time_entry",
"tableTo": "todo",
"columnsFrom": [
"todo_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["todo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -3120,12 +2960,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3133,12 +2969,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3270,4 +3102,4 @@
"schemas": {},
"tables": {}
}
}
}
+85 -253
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -517,12 +497,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -530,12 +506,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -618,12 +590,8 @@
"name": "change_entry_project_id_project_id_fk",
"tableFrom": "change_entry",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -631,12 +599,8 @@
"name": "change_entry_created_by_user_id_fk",
"tableFrom": "change_entry",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -803,12 +767,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -932,12 +892,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -945,12 +901,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1034,12 +986,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1378,12 +1326,8 @@
"name": "lead_area_id_area_id_fk",
"tableFrom": "lead",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1391,12 +1335,8 @@
"name": "lead_project_id_project_id_fk",
"tableFrom": "lead",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1404,12 +1344,8 @@
"name": "lead_owner_user_id_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1417,12 +1353,8 @@
"name": "lead_promoted_deal_id_deal_id_fk",
"tableFrom": "lead",
"tableTo": "deal",
"columnsFrom": [
"promoted_deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["promoted_deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1430,12 +1362,8 @@
"name": "lead_created_by_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1555,12 +1483,8 @@
"name": "lead_contact_lead_id_lead_id_fk",
"tableFrom": "lead_contact",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1614,12 +1538,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1627,12 +1547,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1640,12 +1556,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1754,12 +1666,8 @@
"name": "lead_touchpoint_lead_id_lead_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1767,12 +1675,8 @@
"name": "lead_touchpoint_bearbeiter_user_id_user_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "user",
"columnsFrom": [
"bearbeiter_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["bearbeiter_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1874,12 +1778,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1961,12 +1861,8 @@
"name": "phase_gate_project_id_project_id_fk",
"tableFrom": "phase_gate",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1974,12 +1870,8 @@
"name": "phase_gate_reviewed_by_user_id_fk",
"tableFrom": "phase_gate",
"tableTo": "user",
"columnsFrom": [
"reviewed_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["reviewed_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2226,12 +2118,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -2239,12 +2127,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2252,12 +2136,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2346,12 +2226,8 @@
"name": "project_status_project_id_project_id_fk",
"tableFrom": "project_status",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2359,12 +2235,8 @@
"name": "project_status_created_by_user_id_fk",
"tableFrom": "project_status",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2515,12 +2387,8 @@
"name": "risk_project_id_project_id_fk",
"tableFrom": "risk",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2528,12 +2396,8 @@
"name": "risk_owner_user_id_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2541,12 +2405,8 @@
"name": "risk_created_by_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2637,12 +2497,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2752,12 +2608,8 @@
"name": "stakeholder_project_id_project_id_fk",
"tableFrom": "stakeholder",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2914,12 +2766,8 @@
"name": "time_entry_user_id_user_id_fk",
"tableFrom": "time_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2927,12 +2775,8 @@
"name": "time_entry_day_entry_id_day_entry_id_fk",
"tableFrom": "time_entry",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2940,12 +2784,8 @@
"name": "time_entry_todo_id_todo_id_fk",
"tableFrom": "time_entry",
"tableTo": "todo",
"columnsFrom": [
"todo_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["todo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -3127,12 +2967,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3140,12 +2976,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3277,4 +3109,4 @@
"schemas": {},
"tables": {}
}
}
}
+85 -253
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -517,12 +497,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -530,12 +506,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -618,12 +590,8 @@
"name": "change_entry_project_id_project_id_fk",
"tableFrom": "change_entry",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -631,12 +599,8 @@
"name": "change_entry_created_by_user_id_fk",
"tableFrom": "change_entry",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -803,12 +767,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -932,12 +892,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -945,12 +901,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1034,12 +986,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1378,12 +1326,8 @@
"name": "lead_area_id_area_id_fk",
"tableFrom": "lead",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1391,12 +1335,8 @@
"name": "lead_project_id_project_id_fk",
"tableFrom": "lead",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1404,12 +1344,8 @@
"name": "lead_owner_user_id_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1417,12 +1353,8 @@
"name": "lead_promoted_deal_id_deal_id_fk",
"tableFrom": "lead",
"tableTo": "deal",
"columnsFrom": [
"promoted_deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["promoted_deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1430,12 +1362,8 @@
"name": "lead_created_by_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1555,12 +1483,8 @@
"name": "lead_contact_lead_id_lead_id_fk",
"tableFrom": "lead_contact",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1614,12 +1538,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1627,12 +1547,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1640,12 +1556,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1754,12 +1666,8 @@
"name": "lead_touchpoint_lead_id_lead_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1767,12 +1675,8 @@
"name": "lead_touchpoint_bearbeiter_user_id_user_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "user",
"columnsFrom": [
"bearbeiter_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["bearbeiter_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1874,12 +1778,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1961,12 +1861,8 @@
"name": "phase_gate_project_id_project_id_fk",
"tableFrom": "phase_gate",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1974,12 +1870,8 @@
"name": "phase_gate_reviewed_by_user_id_fk",
"tableFrom": "phase_gate",
"tableTo": "user",
"columnsFrom": [
"reviewed_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["reviewed_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2226,12 +2118,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -2239,12 +2127,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2252,12 +2136,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2346,12 +2226,8 @@
"name": "project_status_project_id_project_id_fk",
"tableFrom": "project_status",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2359,12 +2235,8 @@
"name": "project_status_created_by_user_id_fk",
"tableFrom": "project_status",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2515,12 +2387,8 @@
"name": "risk_project_id_project_id_fk",
"tableFrom": "risk",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2528,12 +2396,8 @@
"name": "risk_owner_user_id_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2541,12 +2405,8 @@
"name": "risk_created_by_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2637,12 +2497,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2752,12 +2608,8 @@
"name": "stakeholder_project_id_project_id_fk",
"tableFrom": "stakeholder",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2914,12 +2766,8 @@
"name": "time_entry_user_id_user_id_fk",
"tableFrom": "time_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2927,12 +2775,8 @@
"name": "time_entry_day_entry_id_day_entry_id_fk",
"tableFrom": "time_entry",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2940,12 +2784,8 @@
"name": "time_entry_todo_id_todo_id_fk",
"tableFrom": "time_entry",
"tableTo": "todo",
"columnsFrom": [
"todo_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["todo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -3127,12 +2967,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3140,12 +2976,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3277,4 +3109,4 @@
"schemas": {},
"tables": {}
}
}
}
+85 -253
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -517,12 +497,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -530,12 +506,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -618,12 +590,8 @@
"name": "change_entry_project_id_project_id_fk",
"tableFrom": "change_entry",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -631,12 +599,8 @@
"name": "change_entry_created_by_user_id_fk",
"tableFrom": "change_entry",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -822,12 +786,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -951,12 +911,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -964,12 +920,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1053,12 +1005,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1397,12 +1345,8 @@
"name": "lead_area_id_area_id_fk",
"tableFrom": "lead",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1410,12 +1354,8 @@
"name": "lead_project_id_project_id_fk",
"tableFrom": "lead",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1423,12 +1363,8 @@
"name": "lead_owner_user_id_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1436,12 +1372,8 @@
"name": "lead_promoted_deal_id_deal_id_fk",
"tableFrom": "lead",
"tableTo": "deal",
"columnsFrom": [
"promoted_deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["promoted_deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1449,12 +1381,8 @@
"name": "lead_created_by_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1574,12 +1502,8 @@
"name": "lead_contact_lead_id_lead_id_fk",
"tableFrom": "lead_contact",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1633,12 +1557,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1646,12 +1566,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1659,12 +1575,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1773,12 +1685,8 @@
"name": "lead_touchpoint_lead_id_lead_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1786,12 +1694,8 @@
"name": "lead_touchpoint_bearbeiter_user_id_user_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "user",
"columnsFrom": [
"bearbeiter_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["bearbeiter_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1893,12 +1797,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1980,12 +1880,8 @@
"name": "phase_gate_project_id_project_id_fk",
"tableFrom": "phase_gate",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1993,12 +1889,8 @@
"name": "phase_gate_reviewed_by_user_id_fk",
"tableFrom": "phase_gate",
"tableTo": "user",
"columnsFrom": [
"reviewed_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["reviewed_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2245,12 +2137,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -2258,12 +2146,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2271,12 +2155,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2365,12 +2245,8 @@
"name": "project_status_project_id_project_id_fk",
"tableFrom": "project_status",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2378,12 +2254,8 @@
"name": "project_status_created_by_user_id_fk",
"tableFrom": "project_status",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2534,12 +2406,8 @@
"name": "risk_project_id_project_id_fk",
"tableFrom": "risk",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2547,12 +2415,8 @@
"name": "risk_owner_user_id_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2560,12 +2424,8 @@
"name": "risk_created_by_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2656,12 +2516,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2771,12 +2627,8 @@
"name": "stakeholder_project_id_project_id_fk",
"tableFrom": "stakeholder",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2933,12 +2785,8 @@
"name": "time_entry_user_id_user_id_fk",
"tableFrom": "time_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2946,12 +2794,8 @@
"name": "time_entry_day_entry_id_day_entry_id_fk",
"tableFrom": "time_entry",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2959,12 +2803,8 @@
"name": "time_entry_todo_id_todo_id_fk",
"tableFrom": "time_entry",
"tableTo": "todo",
"columnsFrom": [
"todo_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["todo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -3146,12 +2986,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3159,12 +2995,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3296,4 +3128,4 @@
"schemas": {},
"tables": {}
}
}
}
+85 -253
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -517,12 +497,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -530,12 +506,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -618,12 +590,8 @@
"name": "change_entry_project_id_project_id_fk",
"tableFrom": "change_entry",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -631,12 +599,8 @@
"name": "change_entry_created_by_user_id_fk",
"tableFrom": "change_entry",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -822,12 +786,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -951,12 +911,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -964,12 +920,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1053,12 +1005,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1397,12 +1345,8 @@
"name": "lead_area_id_area_id_fk",
"tableFrom": "lead",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1410,12 +1354,8 @@
"name": "lead_project_id_project_id_fk",
"tableFrom": "lead",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1423,12 +1363,8 @@
"name": "lead_owner_user_id_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1436,12 +1372,8 @@
"name": "lead_promoted_deal_id_deal_id_fk",
"tableFrom": "lead",
"tableTo": "deal",
"columnsFrom": [
"promoted_deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["promoted_deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1449,12 +1381,8 @@
"name": "lead_created_by_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1574,12 +1502,8 @@
"name": "lead_contact_lead_id_lead_id_fk",
"tableFrom": "lead_contact",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1633,12 +1557,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1646,12 +1566,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1659,12 +1575,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1773,12 +1685,8 @@
"name": "lead_touchpoint_lead_id_lead_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1786,12 +1694,8 @@
"name": "lead_touchpoint_bearbeiter_user_id_user_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "user",
"columnsFrom": [
"bearbeiter_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["bearbeiter_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1893,12 +1797,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1980,12 +1880,8 @@
"name": "phase_gate_project_id_project_id_fk",
"tableFrom": "phase_gate",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1993,12 +1889,8 @@
"name": "phase_gate_reviewed_by_user_id_fk",
"tableFrom": "phase_gate",
"tableTo": "user",
"columnsFrom": [
"reviewed_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["reviewed_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2245,12 +2137,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -2258,12 +2146,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2271,12 +2155,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2365,12 +2245,8 @@
"name": "project_status_project_id_project_id_fk",
"tableFrom": "project_status",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2378,12 +2254,8 @@
"name": "project_status_created_by_user_id_fk",
"tableFrom": "project_status",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2534,12 +2406,8 @@
"name": "risk_project_id_project_id_fk",
"tableFrom": "risk",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2547,12 +2415,8 @@
"name": "risk_owner_user_id_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2560,12 +2424,8 @@
"name": "risk_created_by_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2656,12 +2516,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2771,12 +2627,8 @@
"name": "stakeholder_project_id_project_id_fk",
"tableFrom": "stakeholder",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2933,12 +2785,8 @@
"name": "time_entry_user_id_user_id_fk",
"tableFrom": "time_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2946,12 +2794,8 @@
"name": "time_entry_day_entry_id_day_entry_id_fk",
"tableFrom": "time_entry",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2959,12 +2803,8 @@
"name": "time_entry_todo_id_todo_id_fk",
"tableFrom": "time_entry",
"tableTo": "todo",
"columnsFrom": [
"todo_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["todo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -3146,12 +2986,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3159,12 +2995,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3296,4 +3128,4 @@
"schemas": {},
"tables": {}
}
}
}
+85 -253
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -517,12 +497,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -530,12 +506,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -618,12 +590,8 @@
"name": "change_entry_project_id_project_id_fk",
"tableFrom": "change_entry",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -631,12 +599,8 @@
"name": "change_entry_created_by_user_id_fk",
"tableFrom": "change_entry",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -822,12 +786,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -951,12 +911,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -964,12 +920,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1053,12 +1005,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1397,12 +1345,8 @@
"name": "lead_area_id_area_id_fk",
"tableFrom": "lead",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1410,12 +1354,8 @@
"name": "lead_project_id_project_id_fk",
"tableFrom": "lead",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1423,12 +1363,8 @@
"name": "lead_owner_user_id_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1436,12 +1372,8 @@
"name": "lead_promoted_deal_id_deal_id_fk",
"tableFrom": "lead",
"tableTo": "deal",
"columnsFrom": [
"promoted_deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["promoted_deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1449,12 +1381,8 @@
"name": "lead_created_by_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1574,12 +1502,8 @@
"name": "lead_contact_lead_id_lead_id_fk",
"tableFrom": "lead_contact",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1633,12 +1557,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1646,12 +1566,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1659,12 +1575,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1773,12 +1685,8 @@
"name": "lead_touchpoint_lead_id_lead_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1786,12 +1694,8 @@
"name": "lead_touchpoint_bearbeiter_user_id_user_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "user",
"columnsFrom": [
"bearbeiter_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["bearbeiter_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1893,12 +1797,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1980,12 +1880,8 @@
"name": "phase_gate_project_id_project_id_fk",
"tableFrom": "phase_gate",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1993,12 +1889,8 @@
"name": "phase_gate_reviewed_by_user_id_fk",
"tableFrom": "phase_gate",
"tableTo": "user",
"columnsFrom": [
"reviewed_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["reviewed_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2251,12 +2143,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -2264,12 +2152,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2277,12 +2161,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2371,12 +2251,8 @@
"name": "project_status_project_id_project_id_fk",
"tableFrom": "project_status",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2384,12 +2260,8 @@
"name": "project_status_created_by_user_id_fk",
"tableFrom": "project_status",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2540,12 +2412,8 @@
"name": "risk_project_id_project_id_fk",
"tableFrom": "risk",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2553,12 +2421,8 @@
"name": "risk_owner_user_id_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2566,12 +2430,8 @@
"name": "risk_created_by_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2662,12 +2522,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2777,12 +2633,8 @@
"name": "stakeholder_project_id_project_id_fk",
"tableFrom": "stakeholder",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2939,12 +2791,8 @@
"name": "time_entry_user_id_user_id_fk",
"tableFrom": "time_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2952,12 +2800,8 @@
"name": "time_entry_day_entry_id_day_entry_id_fk",
"tableFrom": "time_entry",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2965,12 +2809,8 @@
"name": "time_entry_todo_id_todo_id_fk",
"tableFrom": "time_entry",
"tableTo": "todo",
"columnsFrom": [
"todo_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["todo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -3152,12 +2992,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3165,12 +3001,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3302,4 +3134,4 @@
"schemas": {},
"tables": {}
}
}
}
+91 -271
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_area_id_area_id_fk",
"tableFrom": "blocker",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_project_id_project_id_fk",
"tableFrom": "blocker",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -441,12 +421,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -454,12 +430,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -543,12 +515,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -556,12 +524,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -644,12 +608,8 @@
"name": "change_entry_project_id_project_id_fk",
"tableFrom": "change_entry",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -657,12 +617,8 @@
"name": "change_entry_created_by_user_id_fk",
"tableFrom": "change_entry",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -848,12 +804,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -861,12 +813,8 @@
"name": "day_entry_blocker_id_blocker_id_fk",
"tableFrom": "day_entry",
"tableTo": "blocker",
"columnsFrom": [
"blocker_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["blocker_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -990,12 +938,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1003,12 +947,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1092,12 +1032,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1436,12 +1372,8 @@
"name": "lead_area_id_area_id_fk",
"tableFrom": "lead",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1449,12 +1381,8 @@
"name": "lead_project_id_project_id_fk",
"tableFrom": "lead",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1462,12 +1390,8 @@
"name": "lead_owner_user_id_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1475,12 +1399,8 @@
"name": "lead_promoted_deal_id_deal_id_fk",
"tableFrom": "lead",
"tableTo": "deal",
"columnsFrom": [
"promoted_deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["promoted_deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1488,12 +1408,8 @@
"name": "lead_created_by_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1613,12 +1529,8 @@
"name": "lead_contact_lead_id_lead_id_fk",
"tableFrom": "lead_contact",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1672,12 +1584,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1685,12 +1593,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1698,12 +1602,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1812,12 +1712,8 @@
"name": "lead_touchpoint_lead_id_lead_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1825,12 +1721,8 @@
"name": "lead_touchpoint_bearbeiter_user_id_user_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "user",
"columnsFrom": [
"bearbeiter_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["bearbeiter_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1932,12 +1824,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2019,12 +1907,8 @@
"name": "phase_gate_project_id_project_id_fk",
"tableFrom": "phase_gate",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2032,12 +1916,8 @@
"name": "phase_gate_reviewed_by_user_id_fk",
"tableFrom": "phase_gate",
"tableTo": "user",
"columnsFrom": [
"reviewed_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["reviewed_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2290,12 +2170,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -2303,12 +2179,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2316,12 +2188,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2410,12 +2278,8 @@
"name": "project_status_project_id_project_id_fk",
"tableFrom": "project_status",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2423,12 +2287,8 @@
"name": "project_status_created_by_user_id_fk",
"tableFrom": "project_status",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2579,12 +2439,8 @@
"name": "risk_project_id_project_id_fk",
"tableFrom": "risk",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2592,12 +2448,8 @@
"name": "risk_owner_user_id_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2605,12 +2457,8 @@
"name": "risk_created_by_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2701,12 +2549,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2816,12 +2660,8 @@
"name": "stakeholder_project_id_project_id_fk",
"tableFrom": "stakeholder",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2978,12 +2818,8 @@
"name": "time_entry_user_id_user_id_fk",
"tableFrom": "time_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2991,12 +2827,8 @@
"name": "time_entry_day_entry_id_day_entry_id_fk",
"tableFrom": "time_entry",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -3004,12 +2836,8 @@
"name": "time_entry_todo_id_todo_id_fk",
"tableFrom": "time_entry",
"tableTo": "todo",
"columnsFrom": [
"todo_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["todo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -3191,12 +3019,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3204,12 +3028,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3341,4 +3161,4 @@
"schemas": {},
"tables": {}
}
}
}
+91 -271
View File
@@ -69,12 +69,8 @@
"name": "absence_day_user_id_user_id_fk",
"tableFrom": "absence_day",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -261,12 +257,8 @@
"name": "audit_event_actor_user_id_user_id_fk",
"tableFrom": "audit_event",
"tableTo": "user",
"columnsFrom": [
"actor_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["actor_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -402,12 +394,8 @@
"name": "blocker_area_id_area_id_fk",
"tableFrom": "blocker",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -415,12 +403,8 @@
"name": "blocker_project_id_project_id_fk",
"tableFrom": "blocker",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -428,12 +412,8 @@
"name": "blocker_owner_user_id_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -441,12 +421,8 @@
"name": "blocker_opened_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"opened_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["opened_by"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -454,12 +430,8 @@
"name": "blocker_resolved_by_user_id_fk",
"tableFrom": "blocker",
"tableTo": "user",
"columnsFrom": [
"resolved_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["resolved_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -543,12 +515,8 @@
"name": "campaign_area_id_area_id_fk",
"tableFrom": "campaign",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -556,12 +524,8 @@
"name": "campaign_owner_user_id_user_id_fk",
"tableFrom": "campaign",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -644,12 +608,8 @@
"name": "change_entry_project_id_project_id_fk",
"tableFrom": "change_entry",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -657,12 +617,8 @@
"name": "change_entry_created_by_user_id_fk",
"tableFrom": "change_entry",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -848,12 +804,8 @@
"name": "day_entry_user_id_user_id_fk",
"tableFrom": "day_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -861,12 +813,8 @@
"name": "day_entry_blocker_id_blocker_id_fk",
"tableFrom": "day_entry",
"tableTo": "blocker",
"columnsFrom": [
"blocker_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["blocker_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -990,12 +938,8 @@
"name": "deal_area_id_area_id_fk",
"tableFrom": "deal",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1003,12 +947,8 @@
"name": "deal_owner_user_id_user_id_fk",
"tableFrom": "deal",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1092,12 +1032,8 @@
"name": "gtm_step_owner_user_id_user_id_fk",
"tableFrom": "gtm_step",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1436,12 +1372,8 @@
"name": "lead_area_id_area_id_fk",
"tableFrom": "lead",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -1449,12 +1381,8 @@
"name": "lead_project_id_project_id_fk",
"tableFrom": "lead",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1462,12 +1390,8 @@
"name": "lead_owner_user_id_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1475,12 +1399,8 @@
"name": "lead_promoted_deal_id_deal_id_fk",
"tableFrom": "lead",
"tableTo": "deal",
"columnsFrom": [
"promoted_deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["promoted_deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1488,12 +1408,8 @@
"name": "lead_created_by_user_id_fk",
"tableFrom": "lead",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1613,12 +1529,8 @@
"name": "lead_contact_lead_id_lead_id_fk",
"tableFrom": "lead_contact",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -1672,12 +1584,8 @@
"name": "lead_handover_campaign_id_campaign_id_fk",
"tableFrom": "lead_handover",
"tableTo": "campaign",
"columnsFrom": [
"campaign_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["campaign_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1685,12 +1593,8 @@
"name": "lead_handover_deal_id_deal_id_fk",
"tableFrom": "lead_handover",
"tableTo": "deal",
"columnsFrom": [
"deal_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["deal_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -1698,12 +1602,8 @@
"name": "lead_handover_uebergeben_von_user_id_fk",
"tableFrom": "lead_handover",
"tableTo": "user",
"columnsFrom": [
"uebergeben_von"
],
"columnsTo": [
"id"
],
"columnsFrom": ["uebergeben_von"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1812,12 +1712,8 @@
"name": "lead_touchpoint_lead_id_lead_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "lead",
"columnsFrom": [
"lead_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["lead_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -1825,12 +1721,8 @@
"name": "lead_touchpoint_bearbeiter_user_id_user_id_fk",
"tableFrom": "lead_touchpoint",
"tableTo": "user",
"columnsFrom": [
"bearbeiter_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["bearbeiter_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -1932,12 +1824,8 @@
"name": "milestone_project_id_project_id_fk",
"tableFrom": "milestone",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2019,12 +1907,8 @@
"name": "phase_gate_project_id_project_id_fk",
"tableFrom": "phase_gate",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2032,12 +1916,8 @@
"name": "phase_gate_reviewed_by_user_id_fk",
"tableFrom": "phase_gate",
"tableTo": "user",
"columnsFrom": [
"reviewed_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["reviewed_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2296,12 +2176,8 @@
"name": "project_area_id_area_id_fk",
"tableFrom": "project",
"tableTo": "area",
"columnsFrom": [
"area_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["area_id"],
"columnsTo": ["id"],
"onDelete": "restrict",
"onUpdate": "no action"
},
@@ -2309,12 +2185,8 @@
"name": "project_verantwortliche_user_id_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"verantwortliche_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["verantwortliche_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2322,12 +2194,8 @@
"name": "project_created_by_user_id_fk",
"tableFrom": "project",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2416,12 +2284,8 @@
"name": "project_status_project_id_project_id_fk",
"tableFrom": "project_status",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2429,12 +2293,8 @@
"name": "project_status_created_by_user_id_fk",
"tableFrom": "project_status",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2585,12 +2445,8 @@
"name": "risk_project_id_project_id_fk",
"tableFrom": "risk",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2598,12 +2454,8 @@
"name": "risk_owner_user_id_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"owner_user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["owner_user_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -2611,12 +2463,8 @@
"name": "risk_created_by_user_id_fk",
"tableFrom": "risk",
"tableTo": "user",
"columnsFrom": [
"created_by"
],
"columnsTo": [
"id"
],
"columnsFrom": ["created_by"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -2707,12 +2555,8 @@
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2822,12 +2666,8 @@
"name": "stakeholder_project_id_project_id_fk",
"tableFrom": "stakeholder",
"tableTo": "project",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -2984,12 +2824,8 @@
"name": "time_entry_user_id_user_id_fk",
"tableFrom": "time_entry",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -2997,12 +2833,8 @@
"name": "time_entry_day_entry_id_day_entry_id_fk",
"tableFrom": "time_entry",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
},
@@ -3010,12 +2842,8 @@
"name": "time_entry_todo_id_todo_id_fk",
"tableFrom": "time_entry",
"tableTo": "todo",
"columnsFrom": [
"todo_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["todo_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
@@ -3197,12 +3025,8 @@
"name": "todo_day_entry_id_day_entry_id_fk",
"tableFrom": "todo",
"tableTo": "day_entry",
"columnsFrom": [
"day_entry_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["day_entry_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
@@ -3210,12 +3034,8 @@
"name": "todo_user_id_user_id_fk",
"tableFrom": "todo",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
@@ -3347,4 +3167,4 @@
"schemas": {},
"tables": {}
}
}
}
+1 -1
View File
@@ -136,4 +136,4 @@
"breakpoints": true
}
]
}
}
+182 -26
View File
@@ -210,12 +210,48 @@ export async function seed(connectionString: string): Promise<void> {
if (proj1 && proj2 && proj3) {
await db.insert(milestone).values([
{ projectId: proj1.id, title: 'Auftragsformular Phase 1', due: isoDateOffset(-5), status: 'done', order: 0 },
{ projectId: proj1.id, title: 'Stripe Webhook-Tests', due: isoDateOffset(10), status: 'open', order: 1 },
{ projectId: proj1.id, title: 'Pilot mit Kunde', due: isoDateOffset(25), status: 'open', order: 2 },
{ projectId: proj2.id, title: 'Tagesrhythmus produktiv', due: isoDateOffset(5), status: 'open', order: 0 },
{ projectId: proj2.id, title: 'Pflicht-Minimum vollständig', due: isoDateOffset(20), status: 'open', order: 1 },
{ projectId: proj3.id, title: 'Token-Refresh Bugfix', due: isoDateOffset(-3), status: 'overdue', order: 0 },
{
projectId: proj1.id,
title: 'Auftragsformular Phase 1',
due: isoDateOffset(-5),
status: 'done',
order: 0,
},
{
projectId: proj1.id,
title: 'Stripe Webhook-Tests',
due: isoDateOffset(10),
status: 'open',
order: 1,
},
{
projectId: proj1.id,
title: 'Pilot mit Kunde',
due: isoDateOffset(25),
status: 'open',
order: 2,
},
{
projectId: proj2.id,
title: 'Tagesrhythmus produktiv',
due: isoDateOffset(5),
status: 'open',
order: 0,
},
{
projectId: proj2.id,
title: 'Pflicht-Minimum vollständig',
due: isoDateOffset(20),
status: 'open',
order: 1,
},
{
projectId: proj3.id,
title: 'Token-Refresh Bugfix',
due: isoDateOffset(-3),
status: 'overdue',
order: 0,
},
]);
}
}
@@ -225,10 +261,38 @@ export async function seed(connectionString: string): Promise<void> {
if (existingDeals.length === 0) {
const sales = areaBySlug.vertrieb!;
await db.insert(deal).values([
{ areaId: sales.id, name: 'Schmidt & Söhne Wartungsvertrag', ownerUserId: anna.id, valueEur: 1_200_000, probability: 70, stage: 'angebot' },
{ areaId: sales.id, name: 'Bauwerk AG Plattform', ownerUserId: anna.id, valueEur: 850_000, probability: 50, stage: 'demo' },
{ areaId: sales.id, name: 'Müller GmbH Onboarding', ownerUserId: anna.id, valueEur: 250_000, probability: 30, stage: 'erstgespraech' },
{ areaId: sales.id, name: 'Hartmann KG Pilot', ownerUserId: anna.id, valueEur: 180_000, probability: 80, stage: 'angebot' },
{
areaId: sales.id,
name: 'Schmidt & Söhne Wartungsvertrag',
ownerUserId: anna.id,
valueEur: 1_200_000,
probability: 70,
stage: 'angebot',
},
{
areaId: sales.id,
name: 'Bauwerk AG Plattform',
ownerUserId: anna.id,
valueEur: 850_000,
probability: 50,
stage: 'demo',
},
{
areaId: sales.id,
name: 'Müller GmbH Onboarding',
ownerUserId: anna.id,
valueEur: 250_000,
probability: 30,
stage: 'erstgespraech',
},
{
areaId: sales.id,
name: 'Hartmann KG Pilot',
ownerUserId: anna.id,
valueEur: 180_000,
probability: 80,
stage: 'angebot',
},
{
areaId: sales.id,
name: 'Becker Logistik Phase 1',
@@ -246,9 +310,27 @@ export async function seed(connectionString: string): Promise<void> {
const existingGtm = await db.select().from(gtmStep);
if (existingGtm.length === 0) {
await db.insert(gtmStep).values([
{ product: 'ToolCTRL Suite', title: 'Landingpage live', ownerUserId: marco.id, status: 'done', order: 0 },
{ product: 'ToolCTRL Suite', title: 'Pricing-Sheet final', ownerUserId: anna.id, status: 'in_progress', order: 1 },
{ product: 'ToolCTRL Suite', title: 'Demo-Video produzieren', ownerUserId: marco.id, status: 'open', order: 2 },
{
product: 'ToolCTRL Suite',
title: 'Landingpage live',
ownerUserId: marco.id,
status: 'done',
order: 0,
},
{
product: 'ToolCTRL Suite',
title: 'Pricing-Sheet final',
ownerUserId: anna.id,
status: 'in_progress',
order: 1,
},
{
product: 'ToolCTRL Suite',
title: 'Demo-Video produzieren',
ownerUserId: marco.id,
status: 'open',
order: 2,
},
]);
}
@@ -259,9 +341,27 @@ export async function seed(connectionString: string): Promise<void> {
const [c1, c2] = await db
.insert(campaign)
.values([
{ areaId: mkt.id, name: 'LinkedIn Q2 Outbound', status: 'active', reach: 18500, ownerUserId: marco.id },
{ areaId: mkt.id, name: 'Webinar-Serie „Workflows"', status: 'active', reach: 4200, ownerUserId: marco.id },
{ areaId: mkt.id, name: 'Newsletter Spring', status: 'done', reach: 2200, ownerUserId: marco.id },
{
areaId: mkt.id,
name: 'LinkedIn Q2 Outbound',
status: 'active',
reach: 18500,
ownerUserId: marco.id,
},
{
areaId: mkt.id,
name: 'Webinar-Serie „Workflows"',
status: 'active',
reach: 4200,
ownerUserId: marco.id,
},
{
areaId: mkt.id,
name: 'Newsletter Spring',
status: 'done',
reach: 2200,
ownerUserId: marco.id,
},
])
.returning();
if (c1 && c2) {
@@ -296,9 +396,33 @@ export async function seed(connectionString: string): Promise<void> {
.returning();
if (d1) {
await db.insert(todo).values([
{ dayEntryId: d1.id, userId: dejan.id, date: yesterday, title: 'Stripe-Webhook implementieren', order: 0, status: 'done', bezugKind: 'project' },
{ dayEntryId: d1.id, userId: dejan.id, date: yesterday, title: 'Pilot-Demo vorbereiten', order: 1, status: 'done', bezugKind: 'project' },
{ dayEntryId: d1.id, userId: dejan.id, date: yesterday, title: 'Marketing-Briefing review', order: 2, status: 'dropped', dropReason: 'Marco war krank' },
{
dayEntryId: d1.id,
userId: dejan.id,
date: yesterday,
title: 'Stripe-Webhook implementieren',
order: 0,
status: 'done',
bezugKind: 'project',
},
{
dayEntryId: d1.id,
userId: dejan.id,
date: yesterday,
title: 'Pilot-Demo vorbereiten',
order: 1,
status: 'done',
bezugKind: 'project',
},
{
dayEntryId: d1.id,
userId: dejan.id,
date: yesterday,
title: 'Marketing-Briefing review',
order: 2,
status: 'dropped',
dropReason: 'Marco war krank',
},
]);
}
@@ -310,7 +434,8 @@ export async function seed(connectionString: string): Promise<void> {
status: 'full',
checkedInAt: new Date(`${yesterday}T09:00:00+02:00`),
reflectedAt: new Date(`${yesterday}T18:00:00+02:00`),
reflectionText: 'Token-Refresh Bug reproduziert, Fix-Hypothese steht. Komme morgen weiter.',
reflectionText:
'Token-Refresh Bug reproduziert, Fix-Hypothese steht. Komme morgen weiter.',
ampel: 'red',
trend: 'schlechter',
publishedAt: new Date(),
@@ -318,8 +443,23 @@ export async function seed(connectionString: string): Promise<void> {
.returning();
if (d2) {
await db.insert(todo).values([
{ dayEntryId: d2.id, userId: lukas.id, date: yesterday, title: 'Token-Refresh debuggen', order: 0, status: 'open', bezugKind: 'project' },
{ dayEntryId: d2.id, userId: lukas.id, date: yesterday, title: 'PR Review für Anna', order: 1, status: 'done' },
{
dayEntryId: d2.id,
userId: lukas.id,
date: yesterday,
title: 'Token-Refresh debuggen',
order: 0,
status: 'open',
bezugKind: 'project',
},
{
dayEntryId: d2.id,
userId: lukas.id,
date: yesterday,
title: 'PR Review für Anna',
order: 1,
status: 'done',
},
]);
}
@@ -339,8 +479,24 @@ export async function seed(connectionString: string): Promise<void> {
.returning();
if (d3) {
await db.insert(todo).values([
{ dayEntryId: d3.id, userId: anna.id, date: yesterday, title: 'Hartmann-Angebot rausschicken', order: 0, status: 'done', bezugKind: 'deal' },
{ dayEntryId: d3.id, userId: anna.id, date: yesterday, title: 'Demo-Termin Schmidt fixieren', order: 1, status: 'done', bezugKind: 'deal' },
{
dayEntryId: d3.id,
userId: anna.id,
date: yesterday,
title: 'Hartmann-Angebot rausschicken',
order: 0,
status: 'done',
bezugKind: 'deal',
},
{
dayEntryId: d3.id,
userId: anna.id,
date: yesterday,
title: 'Demo-Termin Schmidt fixieren',
order: 1,
status: 'done',
bezugKind: 'deal',
},
]);
}
@@ -438,7 +594,8 @@ export async function seed(connectionString: string): Promise<void> {
datum: pickWerktag(2),
kanal: 'linkedin',
bearbeiterUserId: anna.id,
inhalt: 'Erste Nachricht über das MitApp-Profil geschickt, Bezug auf KI-Optimierung für PM.',
inhalt:
'Erste Nachricht über das MitApp-Profil geschickt, Bezug auf KI-Optimierung für PM.',
outcome: 'positiv geantwortet, Interesse an kurzem Austausch',
followUpBis: isoDateOffset(4),
},
@@ -582,7 +739,6 @@ export async function seed(connectionString: string): Promise<void> {
});
}
}
} finally {
await pool.end();
}
+4 -1
View File
@@ -68,7 +68,10 @@ const leadCoreFields = {
nutzenHypothese: z.string().max(1000).nullable(),
differenzierer: z.string().max(1000).nullable(),
naechsterSchritt: z.string().max(1000).nullable(),
naechsterSchrittDatum: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).nullable(),
naechsterSchrittDatum: z
.string()
.regex(/^\d{4}-\d{2}-\d{2}$/)
.nullable(),
risiken: z.string().max(1000).nullable(),
planB: z.string().max(1000).nullable(),
offeneFragen: z.array(offeneFrageSchema).max(100),