diff --git a/docs/anleitungen/TODO.md b/docs/anleitungen/TODO.md index a8ce7c5..5f613a1 100644 --- a/docs/anleitungen/TODO.md +++ b/docs/anleitungen/TODO.md @@ -81,10 +81,10 @@ ### Hohe Priorität -- [ ] **[!] Tenant-Domains konfigurieren** - - Domains in Tenants Collection eintragen - - DNS-Einträge prüfen - - Caddy-Konfiguration für alle Domains +- [x] **Tenant-Domains konfigurieren** (Erledigt: 07.12.2025) + - [x] Domains in Tenants Collection eingetragen + - [x] DNS-Einträge konfiguriert + - [x] ~~Caddy-Konfiguration~~ (nicht benötigt im Tech-Stack) - [x] **E-Mail-System** (Erledigt: 06.12.2025) - [x] Multi-Tenant Email Adapter für Payload CMS @@ -185,14 +185,128 @@ - [ ] Disaster Recovery Plan - [ ] Backup-Rotation (30 Tage Retention) -- [ ] **Monitoring & Logging** +- [ ] **Monitoring & Logging** (→ siehe Phase 4: Produktionsreife) - Sentry Error Tracking - Prometheus Metrics - Grafana Dashboard --- -## Phase 4: Tenant-spezifische Features +## Phase 4: Produktionsreife (Audit-basiert) + +> Basierend auf Audit-Analyse vom 07.12.2025 + +### [!] Hohe Priorität - Stabilität & Sicherheit + +#### Monitoring & Alerting +- [x] **AuditLogs Collection** (Erledigt: 07.12.2025) + - [x] Collection erstellen für: Tenant-Änderungen, Admin-Login, kritische Aktionen + - [x] Automatisches Logging via Collection Hooks (Users, Tenants) + - [x] Sensitive Data Masking (Passwörter, Secrets) + - [ ] Retention Policy (90 Tage) - Cron-Job TODO +- [x] **Email-Fehler Alerting** (Erledigt: 07.12.2025) + - [x] Hook bei wiederholten `failed`-Status in EmailLogs + - [x] Multi-Channel Alert Service (E-Mail, Slack, Discord, Console) + - [x] Konfigurierbare Alert-Level (info, warning, error, critical) + - [ ] Dashboard-Widget für Email-Status im Admin +- [x] **Email-Logs Admin-Verbesserungen** (Erledigt: 07.12.2025) + - [x] Filter nach Status (pending/sent/failed) im Admin + - [x] Export-Endpoint für Email-Logs (CSV/JSON) - `/api/email-logs/export` + - [x] Statistik-Endpoint (letzte 24h/7d/30d) - `/api/email-logs/stats` + +#### Backup & Recovery +- [ ] **Automatisierte Datenbank-Backups** + - [ ] Cron-Job für tägliche pg_dump + - [ ] Offsite-Storage (S3/MinIO) + - [ ] Backup-Rotation (30 Tage Retention) + - [ ] Dokumentierter Restore-Prozess +- [ ] **Media-Backup** + - [ ] S3/MinIO Integration für Media-Uploads + - [ ] Versionierung aktivieren + - [ ] Sync-Script für Offsite-Backup + +#### Security Hardening +- [ ] **API-Schutz erweitern** + - [ ] Globales Rate-Limiting für alle öffentlichen Endpoints + - [ ] IP-Allowlist Option für `/api/send-email` + - [ ] CSRF-Schutz für Browser-basierte API-Calls +- [ ] **Sensitive Data Masking** + - [ ] Email-Error-Logs maskieren (keine Secrets in Admin UI) + - [ ] SMTP-Passwörter in Logs redacten +- [ ] **Secrets Scanning** + - [ ] Pre-commit Hook für Secret-Detection + - [ ] GitHub Secret Scanning aktivieren + +### Mittlere Priorität - Performance & Skalierung + +#### Search Performance +- [ ] **Full-Text-Search aktivieren** + - [ ] `USE_FTS=true` in Production setzen + - [ ] PostgreSQL `to_tsvector`-Indices erstellen + - [ ] Performance-Test mit Produktionsdaten +- [ ] **Redis-Migration für Caches** + - [ ] Search-Cache von In-Memory auf Redis migrieren + - [ ] Rate-Limit-Maps auf Redis migrieren + - [ ] Suggestions-Cache auf Redis + +#### Background Jobs +- [ ] **Queue-System implementieren** + - [ ] BullMQ oder Agenda.js evaluieren + - [ ] E-Mail-Versand über Queue (non-blocking) + - [ ] PDF-Generierung über Queue + - [ ] Job-Dashboard im Admin + +#### Database Optimization +- [ ] **Index-Audit** + - [ ] Composite-Indices für lokalisierte Felder (slug + locale) + - [ ] Query-Performance-Analyse + - [ ] EXPLAIN ANALYZE für häufige Queries +- [ ] **Connection Pooling** + - [ ] PgBouncer evaluieren für Multi-Instanz-Betrieb + +#### Build & Infrastructure +- [ ] **Memory-Problem lösen** + - [ ] Swap auf Server aktivieren (2-4GB) + - [ ] Alternativ: Build auf separatem Runner +- [ ] **PM2 Cluster Mode** + - [ ] Multi-Instanz Konfiguration testen + - [ ] Shared State via Redis sicherstellen + +### Niedrige Priorität - Developer Experience & UX + +#### Testing & CI/CD +- [ ] **Test-Suite reparieren** + - [ ] Test-DB mit Migrationen aufsetzen + - [ ] Skipped Tests aktivieren (email-logs, i18n) + - [ ] Coverage-Report generieren +- [ ] **CI/CD Pipeline** + - [ ] GitHub Actions Workflow erstellen + - [ ] Automatisches Lint/Test/Build + - [ ] Secrets-Scanning in Pipeline + - [ ] Staging-Deployment + +#### Admin UX +- [ ] **Tenant-Wechsel UI** + - [ ] Dropdown in Admin-Leiste für schnellen Tenant-Wechsel + - [ ] Tenant-Kontext in Breadcrumbs anzeigen +- [ ] **Email-Konfiguration UX** + - [ ] Formularvalidierung für SMTP-Settings + - [ ] Tooltips für SPF/DKIM-Hinweise + - [ ] "Test-Email senden" Button +- [ ] **Tenant Self-Service** + - [ ] API für Tenant-Admins zum Testen der SMTP-Settings + - [ ] Email-Logs Einsicht für eigenen Tenant + - [ ] Eigene Statistiken Dashboard + +#### Data Retention +- [ ] **Automatische Datenbereinigung** + - [ ] Cron-Job für Email-Log Cleanup (älter als X Tage) + - [ ] Consent-Logs Archivierung + - [ ] Media-Orphan-Cleanup + +--- + +## Phase 5: Tenant-spezifische Features ### porwoll.de - [ ] Immobilien-Collection (falls benötigt) @@ -281,13 +395,15 @@ 3. **PM2 Cluster Mode:** Aktuell 1 Instanz. Für Skalierung `instances: "max"` setzen. -### Nächste Schritte +### Nächste Schritte (Priorisiert) -1. Tenant-Domains in DB eintragen -2. E-Mail-Adapter konfigurieren -3. Frontend-Entwicklung starten -4. Erste Inhalte einpflegen (DE + EN) -5. Admin-User für Tenants erstellen +1. **[KRITISCH]** AuditLogs Collection implementieren +2. **[KRITISCH]** Automatisierte Backups einrichten +3. **[HOCH]** Full-Text-Search aktivieren (USE_FTS=true) +4. **[HOCH]** Rate-Limits auf Redis migrieren +5. **[MITTEL]** CI/CD Pipeline mit GitHub Actions +6. **[MITTEL]** Frontend-Entwicklung starten +7. **[NIEDRIG]** Admin UX Verbesserungen --- @@ -299,4 +415,4 @@ --- -*Letzte Aktualisierung: 07.12.2025 (E-Mail-System, Portfolio-Collections, Redis Caching)* +*Letzte Aktualisierung: 07.12.2025 (Monitoring & Alerting implementiert)* diff --git a/src/app/(payload)/api/email-logs/export/route.ts b/src/app/(payload)/api/email-logs/export/route.ts new file mode 100644 index 0000000..b627c04 --- /dev/null +++ b/src/app/(payload)/api/email-logs/export/route.ts @@ -0,0 +1,209 @@ +/** + * Email-Logs Export Endpoint + * + * GET /api/email-logs/export + * + * Exportiert Email-Logs als CSV oder JSON. + * Nur für Super Admins und Tenant-Admins (für ihre eigenen Tenants). + * + * Query-Parameter: + * - format: 'csv' | 'json' (default: 'json') + * - tenantId: number (optional, für Filterung) + * - status: 'pending' | 'sent' | 'failed' (optional) + * - from: ISO date string (optional) + * - to: ISO date string (optional) + * - limit: number (default: 1000, max: 10000) + */ + +import { getPayload } from 'payload' +import configPromise from '@payload-config' +import { NextRequest, NextResponse } from 'next/server' + +interface UserWithTenants { + id: number + email: string + isSuperAdmin?: boolean + tenants?: Array<{ tenant: { id: number } | number }> +} + +interface EmailLogEntry { + id: number + to: string + from: string + subject: string + status: string + source: string + messageId?: string + error?: string + createdAt: string + tenant?: { id: number; name?: string } | number +} + +function getUserTenantIds(user: UserWithTenants): number[] { + return (user.tenants || []).map((t) => (typeof t.tenant === 'object' ? t.tenant.id : t.tenant)) +} + +function escapeCsvField(field: string | undefined | null): string { + if (field === undefined || field === null) return '' + const str = String(field) + if (str.includes(',') || str.includes('"') || str.includes('\n')) { + return `"${str.replace(/"/g, '""')}"` + } + return str +} + +function convertToCSV(logs: EmailLogEntry[]): string { + const headers = [ + 'ID', + 'Datum', + 'Empfänger', + 'Absender', + 'Betreff', + 'Status', + 'Quelle', + 'Message-ID', + 'Fehler', + 'Tenant-ID', + ] + + const rows = logs.map((log) => { + const tenantId = typeof log.tenant === 'object' ? log.tenant?.id : log.tenant + return [ + log.id, + log.createdAt, + log.to, + log.from, + log.subject, + log.status, + log.source, + log.messageId || '', + log.error || '', + tenantId || '', + ] + .map((field) => escapeCsvField(String(field))) + .join(',') + }) + + return [headers.join(','), ...rows].join('\n') +} + +export async function GET(req: NextRequest): Promise { + try { + const payload = await getPayload({ config: configPromise }) + + // Auth prüfen + const { user } = await payload.auth({ headers: req.headers }) + + if (!user) { + return NextResponse.json({ error: 'Nicht authentifiziert' }, { status: 401 }) + } + + const typedUser = user as unknown as UserWithTenants + + // Query-Parameter parsen + const searchParams = req.nextUrl.searchParams + const format = searchParams.get('format') || 'json' + const tenantIdParam = searchParams.get('tenantId') + const status = searchParams.get('status') + const fromDate = searchParams.get('from') + const toDate = searchParams.get('to') + const limitParam = searchParams.get('limit') + + // Limit validieren + let limit = parseInt(limitParam || '1000', 10) + if (isNaN(limit) || limit < 1) limit = 1000 + if (limit > 10000) limit = 10000 + + // Tenant-Zugriff prüfen + const userTenantIds = getUserTenantIds(typedUser) + let tenantFilter: number[] | undefined + + if (typedUser.isSuperAdmin) { + // Super Admin kann alle oder gefiltert abrufen + if (tenantIdParam) { + tenantFilter = [parseInt(tenantIdParam, 10)] + } + } else { + // Normale User können nur ihre Tenants sehen + if (tenantIdParam) { + const requestedTenant = parseInt(tenantIdParam, 10) + if (!userTenantIds.includes(requestedTenant)) { + return NextResponse.json({ error: 'Kein Zugriff auf diesen Tenant' }, { status: 403 }) + } + tenantFilter = [requestedTenant] + } else { + tenantFilter = userTenantIds + } + } + + // Query erstellen + const where: Record = {} + + if (tenantFilter) { + where.tenant = { in: tenantFilter } + } + + if (status && ['pending', 'sent', 'failed'].includes(status)) { + where.status = { equals: status } + } + + if (fromDate) { + where.createdAt = { + ...(where.createdAt as object), + greater_than_equal: new Date(fromDate).toISOString(), + } + } + + if (toDate) { + where.createdAt = { + ...(where.createdAt as object), + less_than_equal: new Date(toDate).toISOString(), + } + } + + // Logs abrufen - Type assertion für where da email-logs noch nicht in payload-types + const result = await (payload.find as Function)({ + collection: 'email-logs', + where, + limit, + sort: '-createdAt', + depth: 1, + }) + + const logs = result.docs as EmailLogEntry[] + + // Format-spezifische Response + if (format === 'csv') { + const csv = convertToCSV(logs) + return new NextResponse(csv, { + status: 200, + headers: { + 'Content-Type': 'text/csv; charset=utf-8', + 'Content-Disposition': `attachment; filename="email-logs-${new Date().toISOString().split('T')[0]}.csv"`, + }, + }) + } + + // JSON Response + return NextResponse.json({ + success: true, + total: result.totalDocs, + exported: logs.length, + logs: logs.map((log) => ({ + id: log.id, + to: log.to, + from: log.from, + subject: log.subject, + status: log.status, + source: log.source, + messageId: log.messageId, + error: log.error, + createdAt: log.createdAt, + tenantId: typeof log.tenant === 'object' ? log.tenant?.id : log.tenant, + })), + }) + } catch (error) { + console.error('[EmailLogs:Export] Error:', error) + return NextResponse.json({ error: 'Interner Serverfehler' }, { status: 500 }) + } +} diff --git a/src/app/(payload)/api/email-logs/stats/route.ts b/src/app/(payload)/api/email-logs/stats/route.ts new file mode 100644 index 0000000..71dec8e --- /dev/null +++ b/src/app/(payload)/api/email-logs/stats/route.ts @@ -0,0 +1,175 @@ +/** + * Email-Logs Statistics Endpoint + * + * GET /api/email-logs/stats + * + * Liefert Statistiken über Email-Logs. + * Nur für Super Admins und Tenant-Admins (für ihre eigenen Tenants). + * + * Query-Parameter: + * - tenantId: number (optional) + * - period: '24h' | '7d' | '30d' (default: '7d') + */ + +import { getPayload } from 'payload' +import configPromise from '@payload-config' +import { NextRequest, NextResponse } from 'next/server' + +interface UserWithTenants { + id: number + email: string + isSuperAdmin?: boolean + tenants?: Array<{ tenant: { id: number } | number }> +} + +function getUserTenantIds(user: UserWithTenants): number[] { + return (user.tenants || []).map((t) => (typeof t.tenant === 'object' ? t.tenant.id : t.tenant)) +} + +function getPeriodDate(period: string): Date { + const now = new Date() + switch (period) { + case '24h': + return new Date(now.getTime() - 24 * 60 * 60 * 1000) + case '30d': + return new Date(now.getTime() - 30 * 24 * 60 * 60 * 1000) + case '7d': + default: + return new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000) + } +} + +export async function GET(req: NextRequest): Promise { + try { + const payload = await getPayload({ config: configPromise }) + + // Auth prüfen + const { user } = await payload.auth({ headers: req.headers }) + + if (!user) { + return NextResponse.json({ error: 'Nicht authentifiziert' }, { status: 401 }) + } + + const typedUser = user as unknown as UserWithTenants + + // Query-Parameter parsen + const searchParams = req.nextUrl.searchParams + const tenantIdParam = searchParams.get('tenantId') + const period = searchParams.get('period') || '7d' + + // Tenant-Zugriff prüfen + const userTenantIds = getUserTenantIds(typedUser) + let tenantFilter: number[] | undefined + + if (typedUser.isSuperAdmin) { + if (tenantIdParam) { + tenantFilter = [parseInt(tenantIdParam, 10)] + } + } else { + if (tenantIdParam) { + const requestedTenant = parseInt(tenantIdParam, 10) + if (!userTenantIds.includes(requestedTenant)) { + return NextResponse.json({ error: 'Kein Zugriff auf diesen Tenant' }, { status: 403 }) + } + tenantFilter = [requestedTenant] + } else { + tenantFilter = userTenantIds + } + } + + const periodDate = getPeriodDate(period) + + // Basis-Where für alle Queries + const baseWhere: Record = { + createdAt: { greater_than_equal: periodDate.toISOString() }, + } + + if (tenantFilter) { + baseWhere.tenant = { in: tenantFilter } + } + + // Statistiken parallel abrufen - Type assertions für email-logs Collection + const countFn = payload.count as Function + const findFn = payload.find as Function + + const [totalResult, sentResult, failedResult, pendingResult, recentFailed] = await Promise.all([ + // Gesamt + countFn({ + collection: 'email-logs', + where: baseWhere, + }), + // Gesendet + countFn({ + collection: 'email-logs', + where: { ...baseWhere, status: { equals: 'sent' } }, + }), + // Fehlgeschlagen + countFn({ + collection: 'email-logs', + where: { ...baseWhere, status: { equals: 'failed' } }, + }), + // Ausstehend + countFn({ + collection: 'email-logs', + where: { ...baseWhere, status: { equals: 'pending' } }, + }), + // Letzte 5 fehlgeschlagene (für Quick-View) + findFn({ + collection: 'email-logs', + where: { ...baseWhere, status: { equals: 'failed' } }, + limit: 5, + sort: '-createdAt', + depth: 1, + }), + ]) + + // Erfolgsrate berechnen + const total = totalResult.totalDocs + const sent = sentResult.totalDocs + const failed = failedResult.totalDocs + const pending = pendingResult.totalDocs + const successRate = total > 0 ? Math.round((sent / total) * 100 * 10) / 10 : 0 + + // Statistiken nach Quelle + const sourceStats: Record = {} + const sources = ['manual', 'form', 'system', 'newsletter'] + + await Promise.all( + sources.map(async (source) => { + const result = await countFn({ + collection: 'email-logs', + where: { ...baseWhere, source: { equals: source } }, + }) + sourceStats[source] = result.totalDocs + }), + ) + + return NextResponse.json({ + success: true, + period, + periodStart: periodDate.toISOString(), + stats: { + total, + sent, + failed, + pending, + successRate, + }, + bySource: sourceStats, + recentFailures: recentFailed.docs.map((doc: Record) => ({ + id: doc.id, + to: doc.to, + subject: doc.subject, + error: doc.error, + createdAt: doc.createdAt, + tenantId: + typeof doc.tenant === 'object' && doc.tenant + ? (doc.tenant as { id?: number }).id + : doc.tenant, + })), + }) + } catch (error) { + console.error('[EmailLogs:Stats] Error:', error) + return NextResponse.json({ error: 'Interner Serverfehler' }, { status: 500 }) + } +} diff --git a/src/collections/AuditLogs.ts b/src/collections/AuditLogs.ts new file mode 100644 index 0000000..6b5effc --- /dev/null +++ b/src/collections/AuditLogs.ts @@ -0,0 +1,181 @@ +import type { CollectionConfig } from 'payload' + +/** + * AuditLogs Collection + * + * Protokolliert wichtige System-Aktionen für Compliance und Debugging: + * - Admin-Logins + * - Tenant-Änderungen + * - User-Änderungen (Rollen, Berechtigungen) + * - Kritische Konfigurationsänderungen + * - Fehlgeschlagene Authentifizierungsversuche + */ +export const AuditLogs: CollectionConfig = { + slug: 'audit-logs', + admin: { + useAsTitle: 'action', + group: 'System', + description: 'Protokoll wichtiger System-Aktionen', + defaultColumns: ['action', 'entityType', 'user', 'severity', 'createdAt'], + }, + access: { + // Nur Super Admins können Audit-Logs lesen + read: ({ req }) => { + return Boolean((req.user as { isSuperAdmin?: boolean })?.isSuperAdmin) + }, + // Niemand kann manuell Logs erstellen/bearbeiten + create: () => false, + update: () => false, + delete: () => false, + }, + fields: [ + { + name: 'action', + type: 'select', + required: true, + options: [ + { label: 'Login erfolgreich', value: 'login_success' }, + { label: 'Login fehlgeschlagen', value: 'login_failed' }, + { label: 'Logout', value: 'logout' }, + { label: 'Passwort geändert', value: 'password_changed' }, + { label: 'Passwort zurückgesetzt', value: 'password_reset' }, + { label: 'Dokument erstellt', value: 'create' }, + { label: 'Dokument aktualisiert', value: 'update' }, + { label: 'Dokument gelöscht', value: 'delete' }, + { label: 'Konfiguration geändert', value: 'config_changed' }, + { label: 'E-Mail fehlgeschlagen', value: 'email_failed' }, + { label: 'Zugriff verweigert', value: 'access_denied' }, + { label: 'API Rate-Limit erreicht', value: 'rate_limit' }, + ], + label: 'Aktion', + admin: { + readOnly: true, + }, + }, + { + name: 'severity', + type: 'select', + required: true, + defaultValue: 'info', + options: [ + { label: 'Info', value: 'info' }, + { label: 'Warnung', value: 'warning' }, + { label: 'Fehler', value: 'error' }, + { label: 'Kritisch', value: 'critical' }, + ], + label: 'Schweregrad', + admin: { + readOnly: true, + }, + }, + { + name: 'entityType', + type: 'select', + options: [ + { label: 'Benutzer', value: 'users' }, + { label: 'Tenant', value: 'tenants' }, + { label: 'Seite', value: 'pages' }, + { label: 'Beitrag', value: 'posts' }, + { label: 'Medien', value: 'media' }, + { label: 'Formular', value: 'forms' }, + { label: 'E-Mail', value: 'email' }, + { label: 'Global', value: 'global' }, + { label: 'System', value: 'system' }, + ], + label: 'Entitätstyp', + admin: { + readOnly: true, + }, + }, + { + name: 'entityId', + type: 'text', + label: 'Entitäts-ID', + admin: { + readOnly: true, + description: 'ID des betroffenen Dokuments', + }, + }, + { + name: 'user', + type: 'relationship', + relationTo: 'users', + label: 'Benutzer', + admin: { + readOnly: true, + description: 'Benutzer, der die Aktion ausgeführt hat', + }, + }, + { + name: 'userEmail', + type: 'text', + label: 'Benutzer-E-Mail', + admin: { + readOnly: true, + description: 'E-Mail zum Zeitpunkt der Aktion (für gelöschte User)', + }, + }, + { + name: 'tenant', + type: 'relationship', + relationTo: 'tenants', + label: 'Tenant', + admin: { + readOnly: true, + description: 'Betroffener Tenant (falls zutreffend)', + }, + }, + { + name: 'ipAddress', + type: 'text', + label: 'IP-Adresse', + admin: { + readOnly: true, + }, + }, + { + name: 'userAgent', + type: 'text', + label: 'User-Agent', + admin: { + readOnly: true, + }, + }, + { + name: 'description', + type: 'textarea', + label: 'Beschreibung', + admin: { + readOnly: true, + description: 'Detaillierte Beschreibung der Aktion', + }, + }, + { + name: 'previousValue', + type: 'json', + label: 'Vorheriger Wert', + admin: { + readOnly: true, + description: 'Zustand vor der Änderung', + }, + }, + { + name: 'newValue', + type: 'json', + label: 'Neuer Wert', + admin: { + readOnly: true, + description: 'Zustand nach der Änderung', + }, + }, + { + name: 'metadata', + type: 'json', + label: 'Zusätzliche Daten', + admin: { + readOnly: true, + description: 'Weitere Kontextinformationen', + }, + }, + ], +} diff --git a/src/collections/EmailLogs.ts b/src/collections/EmailLogs.ts index a265bb7..26e727a 100644 --- a/src/collections/EmailLogs.ts +++ b/src/collections/EmailLogs.ts @@ -1,4 +1,5 @@ import type { CollectionConfig } from 'payload' +import { emailFailureAlertHook } from '../hooks/emailFailureAlertHook' export const EmailLogs: CollectionConfig = { slug: 'email-logs', @@ -8,6 +9,9 @@ export const EmailLogs: CollectionConfig = { description: 'Protokoll aller gesendeten E-Mails', defaultColumns: ['to', 'subject', 'status', 'tenant', 'createdAt'], }, + hooks: { + afterChange: [emailFailureAlertHook], + }, access: { // Nur Admins können Logs lesen read: ({ req }) => { diff --git a/src/collections/Tenants.ts b/src/collections/Tenants.ts index 3369290..5312058 100644 --- a/src/collections/Tenants.ts +++ b/src/collections/Tenants.ts @@ -1,5 +1,6 @@ import type { CollectionConfig } from 'payload' import { invalidateEmailCacheHook } from '../hooks/invalidateEmailCache' +import { auditTenantAfterChange, auditTenantAfterDelete } from '../hooks/auditTenantChanges' export const Tenants: CollectionConfig = { slug: 'tenants', @@ -7,7 +8,8 @@ export const Tenants: CollectionConfig = { useAsTitle: 'name', }, hooks: { - afterChange: [invalidateEmailCacheHook], + afterChange: [invalidateEmailCacheHook, auditTenantAfterChange], + afterDelete: [auditTenantAfterDelete], }, fields: [ { diff --git a/src/collections/Users.ts b/src/collections/Users.ts index c3bcb4e..a99a6ad 100644 --- a/src/collections/Users.ts +++ b/src/collections/Users.ts @@ -1,4 +1,5 @@ import type { CollectionConfig } from 'payload' +import { auditUserAfterChange, auditUserAfterDelete } from '../hooks/auditUserChanges' export const Users: CollectionConfig = { slug: 'users', @@ -6,6 +7,10 @@ export const Users: CollectionConfig = { useAsTitle: 'email', }, auth: true, + hooks: { + afterChange: [auditUserAfterChange], + afterDelete: [auditUserAfterDelete], + }, fields: [ { name: 'isSuperAdmin', diff --git a/src/hooks/auditTenantChanges.ts b/src/hooks/auditTenantChanges.ts new file mode 100644 index 0000000..704d2b5 --- /dev/null +++ b/src/hooks/auditTenantChanges.ts @@ -0,0 +1,71 @@ +/** + * Audit Hook für Tenant-Änderungen + * + * Loggt alle Änderungen an Tenant-Dokumenten für Compliance und Debugging. + */ + +import type { CollectionAfterChangeHook, CollectionAfterDeleteHook } from 'payload' +import { logTenantChange } from '../lib/audit/audit-service' + +interface TenantUser { + id: number + email: string + isSuperAdmin?: boolean +} + +/** + * Hook: Loggt Tenant-Erstellung und -Aktualisierung + */ +export const auditTenantAfterChange: CollectionAfterChangeHook = async ({ + doc, + previousDoc, + operation, + req, +}) => { + const user = req.user as TenantUser | undefined + + if (!user) return doc + + // Sensitive Felder aus dem Log entfernen + const sanitizeDoc = (document: Record | undefined) => { + if (!document) return undefined + const sanitized = { ...document } + // SMTP-Passwort entfernen + if (sanitized.email && typeof sanitized.email === 'object') { + const emailConfig = { ...(sanitized.email as Record) } + if (emailConfig.smtp && typeof emailConfig.smtp === 'object') { + const smtp = { ...(emailConfig.smtp as Record) } + delete smtp.pass + emailConfig.smtp = smtp + } + sanitized.email = emailConfig + } + return sanitized + } + + await logTenantChange( + req.payload, + doc.id, + operation, + user.id, + user.email, + sanitizeDoc(previousDoc), + sanitizeDoc(doc), + req, + ) + + return doc +} + +/** + * Hook: Loggt Tenant-Löschung + */ +export const auditTenantAfterDelete: CollectionAfterDeleteHook = async ({ doc, req }) => { + const user = req.user as TenantUser | undefined + + if (!user) return doc + + await logTenantChange(req.payload, doc.id, 'delete', user.id, user.email, doc, undefined, req) + + return doc +} diff --git a/src/hooks/auditUserChanges.ts b/src/hooks/auditUserChanges.ts new file mode 100644 index 0000000..7d9e7d6 --- /dev/null +++ b/src/hooks/auditUserChanges.ts @@ -0,0 +1,86 @@ +/** + * Audit Hook für User-Änderungen + * + * Loggt alle Änderungen an User-Dokumenten für Compliance und Debugging. + */ + +import type { CollectionAfterChangeHook, CollectionAfterDeleteHook } from 'payload' +import { logUserChange } from '../lib/audit/audit-service' + +interface AuditUser { + id: number + email: string + isSuperAdmin?: boolean +} + +/** + * Hook: Loggt User-Erstellung und -Aktualisierung + */ +export const auditUserAfterChange: CollectionAfterChangeHook = async ({ + doc, + previousDoc, + operation, + req, +}) => { + const performingUser = req.user as AuditUser | undefined + + // Nur loggen wenn ein User die Änderung durchführt (nicht bei System-Operationen) + if (!performingUser) return doc + + // Sensitive Felder aus dem Log entfernen + const sanitizeDoc = (document: Record | undefined) => { + if (!document) return undefined + const sanitized = { ...document } + // Passwort-Hash entfernen + delete sanitized.hash + delete sanitized.salt + delete sanitized.password + delete sanitized.resetPasswordToken + delete sanitized.resetPasswordExpiration + return sanitized + } + + await logUserChange( + req.payload, + doc.id, + operation, + performingUser.id, + performingUser.email, + { + previousValue: sanitizeDoc(previousDoc), + newValue: sanitizeDoc(doc), + }, + req, + ) + + return doc +} + +/** + * Hook: Loggt User-Löschung + */ +export const auditUserAfterDelete: CollectionAfterDeleteHook = async ({ doc, req }) => { + const performingUser = req.user as AuditUser | undefined + + if (!performingUser) return doc + + // Sensitive Felder entfernen + const sanitizedDoc = { ...doc } + delete sanitizedDoc.hash + delete sanitizedDoc.salt + delete sanitizedDoc.password + + await logUserChange( + req.payload, + doc.id, + 'delete', + performingUser.id, + performingUser.email, + { + previousValue: sanitizedDoc, + }, + req, + ) + + return doc +} diff --git a/src/hooks/emailFailureAlertHook.ts b/src/hooks/emailFailureAlertHook.ts new file mode 100644 index 0000000..b2b3a97 --- /dev/null +++ b/src/hooks/emailFailureAlertHook.ts @@ -0,0 +1,125 @@ +/** + * Email Failure Alert Hook + * + * Überwacht EmailLogs auf wiederholte Fehler und löst Alerts aus. + * Integriert mit dem Alert-Service für Multi-Channel-Benachrichtigungen. + */ + +import type { CollectionAfterChangeHook } from 'payload' +import { alertEmailFailed } from '../lib/alerting/alert-service' +import { logEmailFailed } from '../lib/audit/audit-service' + +// In-Memory Counter für failed E-Mails pro Tenant (innerhalb von 1 Stunde) +const failedEmailCounter: Map = new Map() +const RESET_INTERVAL = 60 * 60 * 1000 // 1 Stunde + +/** + * Gibt die Anzahl der fehlgeschlagenen E-Mails für einen Tenant zurück + */ +function getFailedCount(tenantId: number): number { + const now = Date.now() + const entry = failedEmailCounter.get(tenantId) + + if (!entry || now - entry.lastReset > RESET_INTERVAL) { + failedEmailCounter.set(tenantId, { count: 0, lastReset: now }) + return 0 + } + + return entry.count +} + +/** + * Inkrementiert den Zähler für fehlgeschlagene E-Mails + */ +function incrementFailedCount(tenantId: number): number { + const now = Date.now() + const entry = failedEmailCounter.get(tenantId) + + if (!entry || now - entry.lastReset > RESET_INTERVAL) { + failedEmailCounter.set(tenantId, { count: 1, lastReset: now }) + return 1 + } + + entry.count++ + return entry.count +} + +interface EmailLogDoc { + id: number + tenant: { id: number; name?: string } | number + to: string + subject: string + status: 'pending' | 'sent' | 'failed' + error?: string +} + +/** + * Hook: Reagiert auf neue EmailLog-Einträge mit Status "failed" + */ +export const emailFailureAlertHook: CollectionAfterChangeHook = async ({ + doc, + previousDoc, + operation, + req, +}) => { + const emailDoc = doc as EmailLogDoc + + // Nur bei Status-Änderung zu "failed" oder neuen failed-Einträgen + const isNewFailed = operation === 'create' && emailDoc.status === 'failed' + const isChangedToFailed = + operation === 'update' && emailDoc.status === 'failed' && previousDoc?.status !== 'failed' + + if (!isNewFailed && !isChangedToFailed) { + return doc + } + + const { payload } = req + + // Tenant-ID und Name ermitteln + const tenantId = typeof emailDoc.tenant === 'object' ? emailDoc.tenant.id : emailDoc.tenant + + let tenantName = 'Unbekannt' + if (typeof emailDoc.tenant === 'object' && emailDoc.tenant.name) { + tenantName = emailDoc.tenant.name + } else { + // Tenant-Name nachladen + try { + const tenant = await payload.findByID({ + collection: 'tenants', + id: tenantId, + }) + tenantName = tenant?.name || `Tenant ${tenantId}` + } catch { + tenantName = `Tenant ${tenantId}` + } + } + + // Fehler-Zähler erhöhen + const failedCount = incrementFailedCount(tenantId) + + // Audit-Log erstellen + await logEmailFailed( + payload, + tenantId, + emailDoc.to, + emailDoc.subject, + emailDoc.error || 'Unbekannter Fehler', + ) + + // Alert senden (bei jedem Fehler, aber mit unterschiedlichem Level basierend auf failedCount) + await alertEmailFailed( + payload, + tenantId, + tenantName, + emailDoc.to, + emailDoc.subject, + emailDoc.error || 'Unbekannter Fehler', + failedCount, + ) + + console.log( + `[EmailFailureAlert] Tenant ${tenantId} (${tenantName}): ${failedCount} fehlgeschlagene E-Mails in der letzten Stunde`, + ) + + return doc +} diff --git a/src/lib/alerting/alert-service.ts b/src/lib/alerting/alert-service.ts new file mode 100644 index 0000000..a2eb33c --- /dev/null +++ b/src/lib/alerting/alert-service.ts @@ -0,0 +1,344 @@ +/** + * Alert Service + * + * Zentraler Service für System-Benachrichtigungen. + * Unterstützt verschiedene Kanäle: E-Mail, Slack, Discord, etc. + */ + +import type { Payload } from 'payload' + +export type AlertChannel = 'email' | 'slack' | 'discord' | 'console' +export type AlertLevel = 'info' | 'warning' | 'error' | 'critical' + +export interface AlertConfig { + channels: AlertChannel[] + recipients?: string[] // E-Mail-Adressen + slackWebhook?: string + discordWebhook?: string + minLevel: AlertLevel +} + +interface AlertInput { + level: AlertLevel + title: string + message: string + details?: Record + tenantId?: number + tenantName?: string +} + +// Alert-Konfiguration aus Environment +const alertConfig: AlertConfig = { + channels: (process.env.ALERT_CHANNELS?.split(',') as AlertChannel[]) || ['console'], + recipients: process.env.ALERT_EMAIL_RECIPIENTS?.split(','), + slackWebhook: process.env.ALERT_SLACK_WEBHOOK, + discordWebhook: process.env.ALERT_DISCORD_WEBHOOK, + minLevel: (process.env.ALERT_MIN_LEVEL as AlertLevel) || 'warning', +} + +// Level-Hierarchie für Filterung +const levelPriority: Record = { + info: 0, + warning: 1, + error: 2, + critical: 3, +} + +/** + * Prüft ob ein Alert basierend auf dem Level gesendet werden soll + */ +function shouldSendAlert(level: AlertLevel): boolean { + return levelPriority[level] >= levelPriority[alertConfig.minLevel] +} + +/** + * Formatiert die Alert-Nachricht für verschiedene Kanäle + */ +function formatAlertMessage(alert: AlertInput, format: 'text' | 'html' | 'markdown'): string { + const timestamp = new Date().toLocaleString('de-DE') + const levelEmoji: Record = { + info: 'ℹ️', + warning: '⚠️', + error: '❌', + critical: '🚨', + } + + if (format === 'html') { + return ` +
+

${levelEmoji[alert.level]} ${alert.title}

+

${timestamp}

+ ${alert.tenantName ? `

Tenant: ${alert.tenantName}

` : ''} +

${alert.message}

+ ${ + alert.details + ? ` +
+ Details +
${JSON.stringify(alert.details, null, 2)}
+
+ ` + : '' + } +
+ ` + } + + if (format === 'markdown') { + let md = `${levelEmoji[alert.level]} **${alert.title}**\n\n` + md += `*${timestamp}*\n\n` + if (alert.tenantName) md += `**Tenant:** ${alert.tenantName}\n\n` + md += `${alert.message}\n` + if (alert.details) { + md += `\n\`\`\`json\n${JSON.stringify(alert.details, null, 2)}\n\`\`\`` + } + return md + } + + // Plain text + let text = `${levelEmoji[alert.level]} ${alert.title}\n` + text += `${timestamp}\n\n` + if (alert.tenantName) text += `Tenant: ${alert.tenantName}\n` + text += `${alert.message}\n` + if (alert.details) { + text += `\nDetails: ${JSON.stringify(alert.details)}` + } + return text +} + +/** + * Sendet Alert via E-Mail + */ +async function sendEmailAlert(payload: Payload, alert: AlertInput): Promise { + if (!alertConfig.recipients?.length) { + console.warn('[AlertService] No email recipients configured') + return + } + + const levelLabels: Record = { + info: 'Info', + warning: 'Warnung', + error: 'Fehler', + critical: 'KRITISCH', + } + + try { + await payload.sendEmail({ + to: alertConfig.recipients.join(','), + subject: `[${levelLabels[alert.level]}] ${alert.title}`, + html: formatAlertMessage(alert, 'html'), + text: formatAlertMessage(alert, 'text'), + }) + console.log(`[AlertService] Email alert sent to ${alertConfig.recipients.join(', ')}`) + } catch (error) { + console.error('[AlertService] Failed to send email alert:', error) + } +} + +/** + * Sendet Alert via Slack Webhook + */ +async function sendSlackAlert(alert: AlertInput): Promise { + if (!alertConfig.slackWebhook) { + console.warn('[AlertService] No Slack webhook configured') + return + } + + const colors: Record = { + info: '#3b82f6', + warning: '#eab308', + error: '#f97316', + critical: '#dc2626', + } + + try { + const response = await fetch(alertConfig.slackWebhook, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + attachments: [ + { + color: colors[alert.level], + title: alert.title, + text: alert.message, + fields: [ + ...(alert.tenantName + ? [ + { + title: 'Tenant', + value: alert.tenantName, + short: true, + }, + ] + : []), + { + title: 'Level', + value: alert.level.toUpperCase(), + short: true, + }, + ], + footer: 'Payload CMS Alert', + ts: Math.floor(Date.now() / 1000), + }, + ], + }), + }) + + if (!response.ok) { + throw new Error(`Slack responded with ${response.status}`) + } + console.log('[AlertService] Slack alert sent') + } catch (error) { + console.error('[AlertService] Failed to send Slack alert:', error) + } +} + +/** + * Sendet Alert via Discord Webhook + */ +async function sendDiscordAlert(alert: AlertInput): Promise { + if (!alertConfig.discordWebhook) { + console.warn('[AlertService] No Discord webhook configured') + return + } + + const colors: Record = { + info: 0x3b82f6, + warning: 0xeab308, + error: 0xf97316, + critical: 0xdc2626, + } + + try { + const response = await fetch(alertConfig.discordWebhook, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + embeds: [ + { + title: alert.title, + description: alert.message, + color: colors[alert.level], + fields: [ + ...(alert.tenantName + ? [ + { + name: 'Tenant', + value: alert.tenantName, + inline: true, + }, + ] + : []), + { + name: 'Level', + value: alert.level.toUpperCase(), + inline: true, + }, + ], + footer: { + text: 'Payload CMS Alert', + }, + timestamp: new Date().toISOString(), + }, + ], + }), + }) + + if (!response.ok) { + throw new Error(`Discord responded with ${response.status}`) + } + console.log('[AlertService] Discord alert sent') + } catch (error) { + console.error('[AlertService] Failed to send Discord alert:', error) + } +} + +/** + * Sendet Alert an alle konfigurierten Kanäle + */ +export async function sendAlert(payload: Payload, alert: AlertInput): Promise { + if (!shouldSendAlert(alert.level)) { + return + } + + const promises: Promise[] = [] + + for (const channel of alertConfig.channels) { + switch (channel) { + case 'email': + promises.push(sendEmailAlert(payload, alert)) + break + case 'slack': + promises.push(sendSlackAlert(alert)) + break + case 'discord': + promises.push(sendDiscordAlert(alert)) + break + case 'console': + console.log(`[Alert:${alert.level.toUpperCase()}]`, formatAlertMessage(alert, 'text')) + break + } + } + + await Promise.allSettled(promises) +} + +/** + * Email-Fehler Alert + */ +export async function alertEmailFailed( + payload: Payload, + tenantId: number, + tenantName: string, + to: string, + subject: string, + error: string, + failedCount: number, +): Promise { + await sendAlert(payload, { + level: failedCount >= 5 ? 'critical' : 'error', + title: `E-Mail-Versand fehlgeschlagen${failedCount >= 5 ? ' (wiederholt)' : ''}`, + message: `E-Mail an "${to}" mit Betreff "${subject}" konnte nicht gesendet werden.`, + tenantId, + tenantName, + details: { + to, + subject, + error: error.substring(0, 200), // Gekürzt um Secrets zu vermeiden + failedCount, + recommendation: + failedCount >= 5 + ? 'SMTP-Konfiguration prüfen! Mehrere Fehler in Folge.' + : 'Einzelner Fehler. Weiter beobachten.', + }, + }) +} + +/** + * Rate-Limit Alert + */ +export async function alertRateLimitReached( + payload: Payload, + endpoint: string, + userId?: number, + userEmail?: string, +): Promise { + await sendAlert(payload, { + level: 'warning', + title: 'Rate-Limit erreicht', + message: `Rate-Limit für Endpoint "${endpoint}" wurde erreicht.`, + details: { + endpoint, + userId, + userEmail, + }, + }) +} diff --git a/src/lib/audit/audit-service.ts b/src/lib/audit/audit-service.ts new file mode 100644 index 0000000..c026eca --- /dev/null +++ b/src/lib/audit/audit-service.ts @@ -0,0 +1,336 @@ +/** + * Audit Service + * + * Zentraler Service für das Logging von Audit-Events. + * Verwendet von Hooks und anderen System-Komponenten. + */ + +import type { Payload, PayloadRequest } from 'payload' + +export type AuditAction = + | 'login_success' + | 'login_failed' + | 'logout' + | 'password_changed' + | 'password_reset' + | 'create' + | 'update' + | 'delete' + | 'config_changed' + | 'email_failed' + | 'access_denied' + | 'rate_limit' + +export type AuditSeverity = 'info' | 'warning' | 'error' | 'critical' + +export type AuditEntityType = + | 'users' + | 'tenants' + | 'pages' + | 'posts' + | 'media' + | 'forms' + | 'email' + | 'global' + | 'system' + +export interface AuditLogInput { + action: AuditAction + severity?: AuditSeverity + entityType?: AuditEntityType + entityId?: string | number + userId?: number + userEmail?: string + tenantId?: number + ipAddress?: string + userAgent?: string + description?: string + previousValue?: Record + newValue?: Record + metadata?: Record +} + +/** + * Extrahiert Client-Informationen aus dem Request + */ +function getClientInfo(req?: PayloadRequest): { ipAddress?: string; userAgent?: string } { + if (!req) return {} + + // IP-Adresse aus verschiedenen Headern extrahieren + const forwarded = req.headers?.get?.('x-forwarded-for') + const realIp = req.headers?.get?.('x-real-ip') + const ipAddress = + (typeof forwarded === 'string' ? forwarded.split(',')[0]?.trim() : undefined) || + (typeof realIp === 'string' ? realIp : undefined) || + 'unknown' + + const userAgent = req.headers?.get?.('user-agent') || undefined + + return { ipAddress, userAgent } +} + +/** + * Bestimmt den Schweregrad basierend auf der Aktion + */ +function getDefaultSeverity(action: AuditAction): AuditSeverity { + switch (action) { + case 'login_failed': + case 'access_denied': + case 'rate_limit': + return 'warning' + case 'email_failed': + return 'error' + case 'delete': + return 'warning' + default: + return 'info' + } +} + +/** + * Erstellt einen Audit-Log-Eintrag + */ +export async function createAuditLog( + payload: Payload, + input: AuditLogInput, + req?: PayloadRequest, +): Promise { + try { + const clientInfo = getClientInfo(req) + + // Type assertion notwendig bis payload-types.ts regeneriert wird + await (payload.create as Function)({ + collection: 'audit-logs', + data: { + action: input.action, + severity: input.severity || getDefaultSeverity(input.action), + entityType: input.entityType, + entityId: input.entityId?.toString(), + user: input.userId, + userEmail: input.userEmail, + tenant: input.tenantId, + ipAddress: input.ipAddress || clientInfo.ipAddress, + userAgent: input.userAgent || clientInfo.userAgent, + description: input.description, + previousValue: input.previousValue, + newValue: input.newValue, + metadata: input.metadata, + }, + // Bypass Access Control für System-Logging + overrideAccess: true, + }) + } catch (error) { + // Fehler beim Audit-Logging sollten die Hauptoperation nicht blockieren + console.error('[AuditService] Error creating audit log:', error) + } +} + +/** + * Loggt einen erfolgreichen Login + */ +export async function logLoginSuccess( + payload: Payload, + userId: number, + userEmail: string, + req?: PayloadRequest, +): Promise { + await createAuditLog( + payload, + { + action: 'login_success', + entityType: 'users', + entityId: userId, + userId, + userEmail, + description: `Benutzer ${userEmail} hat sich erfolgreich angemeldet`, + }, + req, + ) +} + +/** + * Loggt einen fehlgeschlagenen Login + */ +export async function logLoginFailed( + payload: Payload, + email: string, + reason: string, + req?: PayloadRequest, +): Promise { + await createAuditLog( + payload, + { + action: 'login_failed', + severity: 'warning', + entityType: 'users', + userEmail: email, + description: `Fehlgeschlagener Login-Versuch für ${email}: ${reason}`, + metadata: { reason }, + }, + req, + ) +} + +/** + * Loggt eine Tenant-Änderung + */ +export async function logTenantChange( + payload: Payload, + tenantId: number, + action: 'create' | 'update' | 'delete', + userId: number, + userEmail: string, + previousValue?: Record, + newValue?: Record, + req?: PayloadRequest, +): Promise { + const actionLabels = { + create: 'erstellt', + update: 'aktualisiert', + delete: 'gelöscht', + } + + await createAuditLog( + payload, + { + action, + severity: action === 'delete' ? 'warning' : 'info', + entityType: 'tenants', + entityId: tenantId, + userId, + userEmail, + tenantId, + description: `Tenant ${tenantId} wurde ${actionLabels[action]} von ${userEmail}`, + previousValue, + newValue, + }, + req, + ) +} + +/** + * Loggt eine User-Änderung + */ +export async function logUserChange( + payload: Payload, + targetUserId: number, + action: 'create' | 'update' | 'delete', + performedByUserId: number, + performedByEmail: string, + changes?: { previousValue?: Record; newValue?: Record }, + req?: PayloadRequest, +): Promise { + const actionLabels = { + create: 'erstellt', + update: 'aktualisiert', + delete: 'gelöscht', + } + + await createAuditLog( + payload, + { + action, + severity: action === 'delete' ? 'warning' : 'info', + entityType: 'users', + entityId: targetUserId, + userId: performedByUserId, + userEmail: performedByEmail, + description: `Benutzer ${targetUserId} wurde ${actionLabels[action]} von ${performedByEmail}`, + previousValue: changes?.previousValue, + newValue: changes?.newValue, + }, + req, + ) +} + +/** + * Loggt einen E-Mail-Fehler + */ +export async function logEmailFailed( + payload: Payload, + tenantId: number, + to: string, + subject: string, + error: string, + userId?: number, + userEmail?: string, +): Promise { + await createAuditLog(payload, { + action: 'email_failed', + severity: 'error', + entityType: 'email', + tenantId, + userId, + userEmail, + description: `E-Mail an ${to} fehlgeschlagen: ${subject}`, + metadata: { + to, + subject, + // Fehler maskieren um Secrets zu schützen + error: maskSensitiveData(error), + }, + }) +} + +/** + * Loggt einen Zugriffsverweigerung + */ +export async function logAccessDenied( + payload: Payload, + resource: string, + userId?: number, + userEmail?: string, + req?: PayloadRequest, +): Promise { + await createAuditLog( + payload, + { + action: 'access_denied', + severity: 'warning', + entityType: 'system', + userId, + userEmail, + description: `Zugriff auf ${resource} verweigert`, + metadata: { resource }, + }, + req, + ) +} + +/** + * Loggt ein Rate-Limit-Ereignis + */ +export async function logRateLimit( + payload: Payload, + endpoint: string, + userId?: number, + userEmail?: string, + req?: PayloadRequest, +): Promise { + await createAuditLog( + payload, + { + action: 'rate_limit', + severity: 'warning', + entityType: 'system', + userId, + userEmail, + description: `Rate-Limit erreicht für ${endpoint}`, + metadata: { endpoint }, + }, + req, + ) +} + +/** + * Maskiert sensible Daten in Fehlermeldungen + */ +function maskSensitiveData(text: string): string { + // Maskiere Passwörter, Tokens, etc. + return text + .replace(/password['":\s]*['"]?[^'"\s,}]+['"]?/gi, 'password: [REDACTED]') + .replace(/pass['":\s]*['"]?[^'"\s,}]+['"]?/gi, 'pass: [REDACTED]') + .replace(/secret['":\s]*['"]?[^'"\s,}]+['"]?/gi, 'secret: [REDACTED]') + .replace(/token['":\s]*['"]?[^'"\s,}]+['"]?/gi, 'token: [REDACTED]') + .replace(/auth['":\s]*['"]?[^'"\s,}]+['"]?/gi, 'auth: [REDACTED]') +} diff --git a/src/migrations/20251207_205727_audit_logs_collection.json b/src/migrations/20251207_205727_audit_logs_collection.json new file mode 100644 index 0000000..fe2c690 --- /dev/null +++ b/src/migrations/20251207_205727_audit_logs_collection.json @@ -0,0 +1,14766 @@ +{ + "version": "7", + "dialect": "postgresql", + "tables": { + "public.users_tenants": { + "name": "users_tenants", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "users_tenants_order_idx": { + "name": "users_tenants_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_tenants_parent_id_idx": { + "name": "users_tenants_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_tenants_tenant_idx": { + "name": "users_tenants_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_tenants_tenant_id_tenants_id_fk": { + "name": "users_tenants_tenant_id_tenants_id_fk", + "tableFrom": "users_tenants", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "users_tenants_parent_id_fk": { + "name": "users_tenants_parent_id_fk", + "tableFrom": "users_tenants", + "tableTo": "users", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_sessions": { + "name": "users_sessions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "users_sessions_order_idx": { + "name": "users_sessions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_sessions_parent_id_idx": { + "name": "users_sessions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_sessions_parent_id_fk": { + "name": "users_sessions_parent_id_fk", + "tableFrom": "users_sessions", + "tableTo": "users", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "is_super_admin": { + "name": "is_super_admin", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "reset_password_token": { + "name": "reset_password_token", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reset_password_expiration": { + "name": "reset_password_expiration", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "salt": { + "name": "salt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hash": { + "name": "hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "login_attempts": { + "name": "login_attempts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "lock_until": { + "name": "lock_until", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_updated_at_idx": { + "name": "users_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_created_at_idx": { + "name": "users_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_email_idx": { + "name": "users_email_idx", + "columns": [ + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.media": { + "name": "media", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "alt": { + "name": "alt", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "caption": { + "name": "caption", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "credit": { + "name": "credit", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_thumbnail_url": { + "name": "sizes_thumbnail_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_thumbnail_width": { + "name": "sizes_thumbnail_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_thumbnail_height": { + "name": "sizes_thumbnail_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_thumbnail_mime_type": { + "name": "sizes_thumbnail_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_thumbnail_filesize": { + "name": "sizes_thumbnail_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_thumbnail_filename": { + "name": "sizes_thumbnail_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_small_url": { + "name": "sizes_small_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_small_width": { + "name": "sizes_small_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_small_height": { + "name": "sizes_small_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_small_mime_type": { + "name": "sizes_small_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_small_filesize": { + "name": "sizes_small_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_small_filename": { + "name": "sizes_small_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_url": { + "name": "sizes_medium_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_width": { + "name": "sizes_medium_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_height": { + "name": "sizes_medium_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_mime_type": { + "name": "sizes_medium_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_filesize": { + "name": "sizes_medium_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_filename": { + "name": "sizes_medium_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_large_url": { + "name": "sizes_large_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_large_width": { + "name": "sizes_large_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_large_height": { + "name": "sizes_large_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_large_mime_type": { + "name": "sizes_large_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_large_filesize": { + "name": "sizes_large_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_large_filename": { + "name": "sizes_large_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_url": { + "name": "sizes_xlarge_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_width": { + "name": "sizes_xlarge_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_height": { + "name": "sizes_xlarge_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_mime_type": { + "name": "sizes_xlarge_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_filesize": { + "name": "sizes_xlarge_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_filename": { + "name": "sizes_xlarge_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_2k_url": { + "name": "sizes_2k_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_2k_width": { + "name": "sizes_2k_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_2k_height": { + "name": "sizes_2k_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_2k_mime_type": { + "name": "sizes_2k_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_2k_filesize": { + "name": "sizes_2k_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_2k_filename": { + "name": "sizes_2k_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_og_url": { + "name": "sizes_og_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_og_width": { + "name": "sizes_og_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_og_height": { + "name": "sizes_og_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_og_mime_type": { + "name": "sizes_og_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_og_filesize": { + "name": "sizes_og_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_og_filename": { + "name": "sizes_og_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_avif_url": { + "name": "sizes_medium_avif_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_avif_width": { + "name": "sizes_medium_avif_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_avif_height": { + "name": "sizes_medium_avif_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_avif_mime_type": { + "name": "sizes_medium_avif_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_avif_filesize": { + "name": "sizes_medium_avif_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_avif_filename": { + "name": "sizes_medium_avif_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_large_avif_url": { + "name": "sizes_large_avif_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_large_avif_width": { + "name": "sizes_large_avif_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_large_avif_height": { + "name": "sizes_large_avif_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_large_avif_mime_type": { + "name": "sizes_large_avif_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_large_avif_filesize": { + "name": "sizes_large_avif_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_large_avif_filename": { + "name": "sizes_large_avif_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_avif_url": { + "name": "sizes_xlarge_avif_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_avif_width": { + "name": "sizes_xlarge_avif_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_avif_height": { + "name": "sizes_xlarge_avif_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_avif_mime_type": { + "name": "sizes_xlarge_avif_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_avif_filesize": { + "name": "sizes_xlarge_avif_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_avif_filename": { + "name": "sizes_xlarge_avif_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "media_tenant_idx": { + "name": "media_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_updated_at_idx": { + "name": "media_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_created_at_idx": { + "name": "media_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_filename_idx": { + "name": "media_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_thumbnail_sizes_thumbnail_filename_idx": { + "name": "media_sizes_thumbnail_sizes_thumbnail_filename_idx", + "columns": [ + { + "expression": "sizes_thumbnail_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_small_sizes_small_filename_idx": { + "name": "media_sizes_small_sizes_small_filename_idx", + "columns": [ + { + "expression": "sizes_small_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_medium_sizes_medium_filename_idx": { + "name": "media_sizes_medium_sizes_medium_filename_idx", + "columns": [ + { + "expression": "sizes_medium_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_large_sizes_large_filename_idx": { + "name": "media_sizes_large_sizes_large_filename_idx", + "columns": [ + { + "expression": "sizes_large_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_xlarge_sizes_xlarge_filename_idx": { + "name": "media_sizes_xlarge_sizes_xlarge_filename_idx", + "columns": [ + { + "expression": "sizes_xlarge_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_2k_sizes_2k_filename_idx": { + "name": "media_sizes_2k_sizes_2k_filename_idx", + "columns": [ + { + "expression": "sizes_2k_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_og_sizes_og_filename_idx": { + "name": "media_sizes_og_sizes_og_filename_idx", + "columns": [ + { + "expression": "sizes_og_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_medium_avif_sizes_medium_avif_filename_idx": { + "name": "media_sizes_medium_avif_sizes_medium_avif_filename_idx", + "columns": [ + { + "expression": "sizes_medium_avif_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_large_avif_sizes_large_avif_filename_idx": { + "name": "media_sizes_large_avif_sizes_large_avif_filename_idx", + "columns": [ + { + "expression": "sizes_large_avif_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_xlarge_avif_sizes_xlarge_avif_filename_idx": { + "name": "media_sizes_xlarge_avif_sizes_xlarge_avif_filename_idx", + "columns": [ + { + "expression": "sizes_xlarge_avif_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "media_tenant_id_tenants_id_fk": { + "name": "media_tenant_id_tenants_id_fk", + "tableFrom": "media", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.media_texts": { + "name": "media_texts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "media_texts_order_parent": { + "name": "media_texts_order_parent", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "media_texts_parent_fk": { + "name": "media_texts_parent_fk", + "tableFrom": "media_texts", + "tableTo": "media", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tenants_domains": { + "name": "tenants_domains", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "domain": { + "name": "domain", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "tenants_domains_order_idx": { + "name": "tenants_domains_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tenants_domains_parent_id_idx": { + "name": "tenants_domains_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tenants_domains_parent_id_fk": { + "name": "tenants_domains_parent_id_fk", + "tableFrom": "tenants_domains", + "tableTo": "tenants", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tenants": { + "name": "tenants", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "email_from_address": { + "name": "email_from_address", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "email_from_name": { + "name": "email_from_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "email_reply_to": { + "name": "email_reply_to", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "email_use_custom_smtp": { + "name": "email_use_custom_smtp", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "email_smtp_host": { + "name": "email_smtp_host", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "email_smtp_port": { + "name": "email_smtp_port", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 587 + }, + "email_smtp_secure": { + "name": "email_smtp_secure", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "email_smtp_user": { + "name": "email_smtp_user", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "email_smtp_pass": { + "name": "email_smtp_pass", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "tenants_slug_idx": { + "name": "tenants_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tenants_updated_at_idx": { + "name": "tenants_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tenants_created_at_idx": { + "name": "tenants_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_hero_block": { + "name": "pages_blocks_hero_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "background_image_id": { + "name": "background_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "alignment": { + "name": "alignment", + "type": "enum_pages_blocks_hero_block_alignment", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'center'" + }, + "overlay": { + "name": "overlay", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "cta_link": { + "name": "cta_link", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_style": { + "name": "cta_style", + "type": "enum_pages_blocks_hero_block_cta_style", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'primary'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_hero_block_order_idx": { + "name": "pages_blocks_hero_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_hero_block_parent_id_idx": { + "name": "pages_blocks_hero_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_hero_block_path_idx": { + "name": "pages_blocks_hero_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_hero_block_background_image_idx": { + "name": "pages_blocks_hero_block_background_image_idx", + "columns": [ + { + "expression": "background_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_hero_block_background_image_id_media_id_fk": { + "name": "pages_blocks_hero_block_background_image_id_media_id_fk", + "tableFrom": "pages_blocks_hero_block", + "tableTo": "media", + "columnsFrom": [ + "background_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_hero_block_parent_id_fk": { + "name": "pages_blocks_hero_block_parent_id_fk", + "tableFrom": "pages_blocks_hero_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_hero_block_locales": { + "name": "pages_blocks_hero_block_locales", + "schema": "", + "columns": { + "headline": { + "name": "headline", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "subline": { + "name": "subline", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_text": { + "name": "cta_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_hero_block_locales_locale_parent_id_unique": { + "name": "pages_blocks_hero_block_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_hero_block_locales_parent_id_fk": { + "name": "pages_blocks_hero_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_hero_block_locales", + "tableTo": "pages_blocks_hero_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_text_block": { + "name": "pages_blocks_text_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "width": { + "name": "width", + "type": "enum_pages_blocks_text_block_width", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'medium'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_text_block_order_idx": { + "name": "pages_blocks_text_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_text_block_parent_id_idx": { + "name": "pages_blocks_text_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_text_block_path_idx": { + "name": "pages_blocks_text_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_text_block_parent_id_fk": { + "name": "pages_blocks_text_block_parent_id_fk", + "tableFrom": "pages_blocks_text_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_text_block_locales": { + "name": "pages_blocks_text_block_locales", + "schema": "", + "columns": { + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_text_block_locales_locale_parent_id_unique": { + "name": "pages_blocks_text_block_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_text_block_locales_parent_id_fk": { + "name": "pages_blocks_text_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_text_block_locales", + "tableTo": "pages_blocks_text_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_image_text_block": { + "name": "pages_blocks_image_text_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "image_position": { + "name": "image_position", + "type": "enum_pages_blocks_image_text_block_image_position", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'left'" + }, + "cta_link": { + "name": "cta_link", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_image_text_block_order_idx": { + "name": "pages_blocks_image_text_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_image_text_block_parent_id_idx": { + "name": "pages_blocks_image_text_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_image_text_block_path_idx": { + "name": "pages_blocks_image_text_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_image_text_block_image_idx": { + "name": "pages_blocks_image_text_block_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_image_text_block_image_id_media_id_fk": { + "name": "pages_blocks_image_text_block_image_id_media_id_fk", + "tableFrom": "pages_blocks_image_text_block", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_image_text_block_parent_id_fk": { + "name": "pages_blocks_image_text_block_parent_id_fk", + "tableFrom": "pages_blocks_image_text_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_image_text_block_locales": { + "name": "pages_blocks_image_text_block_locales", + "schema": "", + "columns": { + "headline": { + "name": "headline", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "cta_text": { + "name": "cta_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_image_text_block_locales_locale_parent_id_uniqu": { + "name": "pages_blocks_image_text_block_locales_locale_parent_id_uniqu", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_image_text_block_locales_parent_id_fk": { + "name": "pages_blocks_image_text_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_image_text_block_locales", + "tableTo": "pages_blocks_image_text_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_card_grid_block_cards": { + "name": "pages_blocks_card_grid_block_cards", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "link": { + "name": "link", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_card_grid_block_cards_order_idx": { + "name": "pages_blocks_card_grid_block_cards_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_card_grid_block_cards_parent_id_idx": { + "name": "pages_blocks_card_grid_block_cards_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_card_grid_block_cards_image_idx": { + "name": "pages_blocks_card_grid_block_cards_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_card_grid_block_cards_image_id_media_id_fk": { + "name": "pages_blocks_card_grid_block_cards_image_id_media_id_fk", + "tableFrom": "pages_blocks_card_grid_block_cards", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_card_grid_block_cards_parent_id_fk": { + "name": "pages_blocks_card_grid_block_cards_parent_id_fk", + "tableFrom": "pages_blocks_card_grid_block_cards", + "tableTo": "pages_blocks_card_grid_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_card_grid_block_cards_locales": { + "name": "pages_blocks_card_grid_block_cards_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_text": { + "name": "link_text", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'mehr'" + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_card_grid_block_cards_locales_locale_parent_id_": { + "name": "pages_blocks_card_grid_block_cards_locales_locale_parent_id_", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_card_grid_block_cards_locales_parent_id_fk": { + "name": "pages_blocks_card_grid_block_cards_locales_parent_id_fk", + "tableFrom": "pages_blocks_card_grid_block_cards_locales", + "tableTo": "pages_blocks_card_grid_block_cards", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_card_grid_block": { + "name": "pages_blocks_card_grid_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "columns": { + "name": "columns", + "type": "enum_pages_blocks_card_grid_block_columns", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'3'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_card_grid_block_order_idx": { + "name": "pages_blocks_card_grid_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_card_grid_block_parent_id_idx": { + "name": "pages_blocks_card_grid_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_card_grid_block_path_idx": { + "name": "pages_blocks_card_grid_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_card_grid_block_parent_id_fk": { + "name": "pages_blocks_card_grid_block_parent_id_fk", + "tableFrom": "pages_blocks_card_grid_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_card_grid_block_locales": { + "name": "pages_blocks_card_grid_block_locales", + "schema": "", + "columns": { + "headline": { + "name": "headline", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_card_grid_block_locales_locale_parent_id_unique": { + "name": "pages_blocks_card_grid_block_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_card_grid_block_locales_parent_id_fk": { + "name": "pages_blocks_card_grid_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_card_grid_block_locales", + "tableTo": "pages_blocks_card_grid_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_quote_block": { + "name": "pages_blocks_quote_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "author": { + "name": "author", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "style": { + "name": "style", + "type": "enum_pages_blocks_quote_block_style", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'simple'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_quote_block_order_idx": { + "name": "pages_blocks_quote_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_quote_block_parent_id_idx": { + "name": "pages_blocks_quote_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_quote_block_path_idx": { + "name": "pages_blocks_quote_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_quote_block_image_idx": { + "name": "pages_blocks_quote_block_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_quote_block_image_id_media_id_fk": { + "name": "pages_blocks_quote_block_image_id_media_id_fk", + "tableFrom": "pages_blocks_quote_block", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_quote_block_parent_id_fk": { + "name": "pages_blocks_quote_block_parent_id_fk", + "tableFrom": "pages_blocks_quote_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_quote_block_locales": { + "name": "pages_blocks_quote_block_locales", + "schema": "", + "columns": { + "quote": { + "name": "quote", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_quote_block_locales_locale_parent_id_unique": { + "name": "pages_blocks_quote_block_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_quote_block_locales_parent_id_fk": { + "name": "pages_blocks_quote_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_quote_block_locales", + "tableTo": "pages_blocks_quote_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_cta_block_buttons": { + "name": "pages_blocks_cta_block_buttons", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "link": { + "name": "link", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "style": { + "name": "style", + "type": "enum_pages_blocks_cta_block_buttons_style", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'primary'" + } + }, + "indexes": { + "pages_blocks_cta_block_buttons_order_idx": { + "name": "pages_blocks_cta_block_buttons_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_cta_block_buttons_parent_id_idx": { + "name": "pages_blocks_cta_block_buttons_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_cta_block_buttons_parent_id_fk": { + "name": "pages_blocks_cta_block_buttons_parent_id_fk", + "tableFrom": "pages_blocks_cta_block_buttons", + "tableTo": "pages_blocks_cta_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_cta_block_buttons_locales": { + "name": "pages_blocks_cta_block_buttons_locales", + "schema": "", + "columns": { + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_cta_block_buttons_locales_locale_parent_id_uniq": { + "name": "pages_blocks_cta_block_buttons_locales_locale_parent_id_uniq", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_cta_block_buttons_locales_parent_id_fk": { + "name": "pages_blocks_cta_block_buttons_locales_parent_id_fk", + "tableFrom": "pages_blocks_cta_block_buttons_locales", + "tableTo": "pages_blocks_cta_block_buttons", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_cta_block": { + "name": "pages_blocks_cta_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "background_color": { + "name": "background_color", + "type": "enum_pages_blocks_cta_block_background_color", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'dark'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_cta_block_order_idx": { + "name": "pages_blocks_cta_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_cta_block_parent_id_idx": { + "name": "pages_blocks_cta_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_cta_block_path_idx": { + "name": "pages_blocks_cta_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_cta_block_parent_id_fk": { + "name": "pages_blocks_cta_block_parent_id_fk", + "tableFrom": "pages_blocks_cta_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_cta_block_locales": { + "name": "pages_blocks_cta_block_locales", + "schema": "", + "columns": { + "headline": { + "name": "headline", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_cta_block_locales_locale_parent_id_unique": { + "name": "pages_blocks_cta_block_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_cta_block_locales_parent_id_fk": { + "name": "pages_blocks_cta_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_cta_block_locales", + "tableTo": "pages_blocks_cta_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_contact_form_block": { + "name": "pages_blocks_contact_form_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "recipient_email": { + "name": "recipient_email", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'info@porwoll.de'" + }, + "show_phone": { + "name": "show_phone", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "show_address": { + "name": "show_address", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "show_socials": { + "name": "show_socials", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_contact_form_block_order_idx": { + "name": "pages_blocks_contact_form_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_contact_form_block_parent_id_idx": { + "name": "pages_blocks_contact_form_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_contact_form_block_path_idx": { + "name": "pages_blocks_contact_form_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_contact_form_block_parent_id_fk": { + "name": "pages_blocks_contact_form_block_parent_id_fk", + "tableFrom": "pages_blocks_contact_form_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_contact_form_block_locales": { + "name": "pages_blocks_contact_form_block_locales", + "schema": "", + "columns": { + "headline": { + "name": "headline", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Kontakt'" + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_contact_form_block_locales_locale_parent_id_uni": { + "name": "pages_blocks_contact_form_block_locales_locale_parent_id_uni", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_contact_form_block_locales_parent_id_fk": { + "name": "pages_blocks_contact_form_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_contact_form_block_locales", + "tableTo": "pages_blocks_contact_form_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_timeline_block_items": { + "name": "pages_blocks_timeline_block_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "year": { + "name": "year", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "icon": { + "name": "icon", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "link_href": { + "name": "link_href", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_timeline_block_items_order_idx": { + "name": "pages_blocks_timeline_block_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_timeline_block_items_parent_id_idx": { + "name": "pages_blocks_timeline_block_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_timeline_block_items_image_idx": { + "name": "pages_blocks_timeline_block_items_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_timeline_block_items_image_id_media_id_fk": { + "name": "pages_blocks_timeline_block_items_image_id_media_id_fk", + "tableFrom": "pages_blocks_timeline_block_items", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_timeline_block_items_parent_id_fk": { + "name": "pages_blocks_timeline_block_items_parent_id_fk", + "tableFrom": "pages_blocks_timeline_block_items", + "tableTo": "pages_blocks_timeline_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_timeline_block_items_locales": { + "name": "pages_blocks_timeline_block_items_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_label": { + "name": "link_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_timeline_block_items_locales_locale_parent_id_u": { + "name": "pages_blocks_timeline_block_items_locales_locale_parent_id_u", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_timeline_block_items_locales_parent_id_fk": { + "name": "pages_blocks_timeline_block_items_locales_parent_id_fk", + "tableFrom": "pages_blocks_timeline_block_items_locales", + "tableTo": "pages_blocks_timeline_block_items", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_timeline_block": { + "name": "pages_blocks_timeline_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "layout": { + "name": "layout", + "type": "enum_pages_blocks_timeline_block_layout", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'vertical'" + }, + "show_connector": { + "name": "show_connector", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "marker_style": { + "name": "marker_style", + "type": "enum_pages_blocks_timeline_block_marker_style", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'dot'" + }, + "background_color": { + "name": "background_color", + "type": "enum_pages_blocks_timeline_block_background_color", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'white'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_timeline_block_order_idx": { + "name": "pages_blocks_timeline_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_timeline_block_parent_id_idx": { + "name": "pages_blocks_timeline_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_timeline_block_path_idx": { + "name": "pages_blocks_timeline_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_timeline_block_parent_id_fk": { + "name": "pages_blocks_timeline_block_parent_id_fk", + "tableFrom": "pages_blocks_timeline_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_timeline_block_locales": { + "name": "pages_blocks_timeline_block_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "subtitle": { + "name": "subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_timeline_block_locales_locale_parent_id_unique": { + "name": "pages_blocks_timeline_block_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_timeline_block_locales_parent_id_fk": { + "name": "pages_blocks_timeline_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_timeline_block_locales", + "tableTo": "pages_blocks_timeline_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_divider_block": { + "name": "pages_blocks_divider_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "style": { + "name": "style", + "type": "enum_pages_blocks_divider_block_style", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'space'" + }, + "spacing": { + "name": "spacing", + "type": "enum_pages_blocks_divider_block_spacing", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'medium'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_divider_block_order_idx": { + "name": "pages_blocks_divider_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_divider_block_parent_id_idx": { + "name": "pages_blocks_divider_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_divider_block_path_idx": { + "name": "pages_blocks_divider_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_divider_block_parent_id_fk": { + "name": "pages_blocks_divider_block_parent_id_fk", + "tableFrom": "pages_blocks_divider_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_video_block": { + "name": "pages_blocks_video_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "video_url": { + "name": "video_url", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "aspect_ratio": { + "name": "aspect_ratio", + "type": "enum_pages_blocks_video_block_aspect_ratio", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'16:9'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_video_block_order_idx": { + "name": "pages_blocks_video_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_video_block_parent_id_idx": { + "name": "pages_blocks_video_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_video_block_path_idx": { + "name": "pages_blocks_video_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_video_block_parent_id_fk": { + "name": "pages_blocks_video_block_parent_id_fk", + "tableFrom": "pages_blocks_video_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_video_block_locales": { + "name": "pages_blocks_video_block_locales", + "schema": "", + "columns": { + "caption": { + "name": "caption", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_video_block_locales_locale_parent_id_unique": { + "name": "pages_blocks_video_block_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_video_block_locales_parent_id_fk": { + "name": "pages_blocks_video_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_video_block_locales", + "tableTo": "pages_blocks_video_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_posts_list_block": { + "name": "pages_blocks_posts_list_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "post_type": { + "name": "post_type", + "type": "enum_pages_blocks_posts_list_block_post_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'blog'" + }, + "layout": { + "name": "layout", + "type": "enum_pages_blocks_posts_list_block_layout", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'grid'" + }, + "columns": { + "name": "columns", + "type": "enum_pages_blocks_posts_list_block_columns", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'3'" + }, + "limit": { + "name": "limit", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 6 + }, + "show_featured_only": { + "name": "show_featured_only", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "show_excerpt": { + "name": "show_excerpt", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "show_date": { + "name": "show_date", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "show_author": { + "name": "show_author", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "show_category": { + "name": "show_category", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "show_pagination": { + "name": "show_pagination", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "show_read_more": { + "name": "show_read_more", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "read_more_link": { + "name": "read_more_link", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'/blog'" + }, + "background_color": { + "name": "background_color", + "type": "enum_pages_blocks_posts_list_block_background_color", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'white'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_posts_list_block_order_idx": { + "name": "pages_blocks_posts_list_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_posts_list_block_parent_id_idx": { + "name": "pages_blocks_posts_list_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_posts_list_block_path_idx": { + "name": "pages_blocks_posts_list_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_posts_list_block_parent_id_fk": { + "name": "pages_blocks_posts_list_block_parent_id_fk", + "tableFrom": "pages_blocks_posts_list_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_posts_list_block_locales": { + "name": "pages_blocks_posts_list_block_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "subtitle": { + "name": "subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "read_more_label": { + "name": "read_more_label", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Alle Beiträge anzeigen'" + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_posts_list_block_locales_locale_parent_id_uniqu": { + "name": "pages_blocks_posts_list_block_locales_locale_parent_id_uniqu", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_posts_list_block_locales_parent_id_fk": { + "name": "pages_blocks_posts_list_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_posts_list_block_locales", + "tableTo": "pages_blocks_posts_list_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_testimonials_block": { + "name": "pages_blocks_testimonials_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "layout": { + "name": "layout", + "type": "enum_pages_blocks_testimonials_block_layout", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'slider'" + }, + "columns": { + "name": "columns", + "type": "enum_pages_blocks_testimonials_block_columns", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'3'" + }, + "display_mode": { + "name": "display_mode", + "type": "enum_pages_blocks_testimonials_block_display_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'all'" + }, + "limit": { + "name": "limit", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 6 + }, + "show_rating": { + "name": "show_rating", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "show_image": { + "name": "show_image", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "show_company": { + "name": "show_company", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "show_source": { + "name": "show_source", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "autoplay": { + "name": "autoplay", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "autoplay_speed": { + "name": "autoplay_speed", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 5000 + }, + "background_color": { + "name": "background_color", + "type": "enum_pages_blocks_testimonials_block_background_color", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'light'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_testimonials_block_order_idx": { + "name": "pages_blocks_testimonials_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_testimonials_block_parent_id_idx": { + "name": "pages_blocks_testimonials_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_testimonials_block_path_idx": { + "name": "pages_blocks_testimonials_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_testimonials_block_parent_id_fk": { + "name": "pages_blocks_testimonials_block_parent_id_fk", + "tableFrom": "pages_blocks_testimonials_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_testimonials_block_locales": { + "name": "pages_blocks_testimonials_block_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Das sagen unsere Kunden'" + }, + "subtitle": { + "name": "subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_testimonials_block_locales_locale_parent_id_uni": { + "name": "pages_blocks_testimonials_block_locales_locale_parent_id_uni", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_testimonials_block_locales_parent_id_fk": { + "name": "pages_blocks_testimonials_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_testimonials_block_locales", + "tableTo": "pages_blocks_testimonials_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_newsletter_block_available_interests": { + "name": "pages_blocks_newsletter_block_available_interests", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_pages_blocks_newsletter_block_available_interests", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "pages_blocks_newsletter_block_available_interests_order_idx": { + "name": "pages_blocks_newsletter_block_available_interests_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_newsletter_block_available_interests_parent_idx": { + "name": "pages_blocks_newsletter_block_available_interests_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_newsletter_block_available_interests_parent_fk": { + "name": "pages_blocks_newsletter_block_available_interests_parent_fk", + "tableFrom": "pages_blocks_newsletter_block_available_interests", + "tableTo": "pages_blocks_newsletter_block", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_newsletter_block": { + "name": "pages_blocks_newsletter_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "layout": { + "name": "layout", + "type": "enum_pages_blocks_newsletter_block_layout", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'inline'" + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "image_position": { + "name": "image_position", + "type": "enum_pages_blocks_newsletter_block_image_position", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'left'" + }, + "collect_name": { + "name": "collect_name", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "show_interests": { + "name": "show_interests", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "privacy_link": { + "name": "privacy_link", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'/datenschutz'" + }, + "source": { + "name": "source", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'website'" + }, + "background_color": { + "name": "background_color", + "type": "enum_pages_blocks_newsletter_block_background_color", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'accent'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_newsletter_block_order_idx": { + "name": "pages_blocks_newsletter_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_newsletter_block_parent_id_idx": { + "name": "pages_blocks_newsletter_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_newsletter_block_path_idx": { + "name": "pages_blocks_newsletter_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_newsletter_block_image_idx": { + "name": "pages_blocks_newsletter_block_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_newsletter_block_image_id_media_id_fk": { + "name": "pages_blocks_newsletter_block_image_id_media_id_fk", + "tableFrom": "pages_blocks_newsletter_block", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_newsletter_block_parent_id_fk": { + "name": "pages_blocks_newsletter_block_parent_id_fk", + "tableFrom": "pages_blocks_newsletter_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_newsletter_block_locales": { + "name": "pages_blocks_newsletter_block_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Newsletter abonnieren'" + }, + "subtitle": { + "name": "subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Erhalten Sie regelmäßig Updates und Neuigkeiten direkt in Ihr Postfach.'" + }, + "button_text": { + "name": "button_text", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Anmelden'" + }, + "placeholder_email": { + "name": "placeholder_email", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Ihre E-Mail-Adresse'" + }, + "success_message": { + "name": "success_message", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Vielen Dank! Bitte bestätigen Sie Ihre E-Mail-Adresse über den Link in der Bestätigungsmail.'" + }, + "error_message": { + "name": "error_message", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Es ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut.'" + }, + "privacy_text": { + "name": "privacy_text", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Mit der Anmeldung akzeptieren Sie unsere Datenschutzerklärung. Sie können sich jederzeit abmelden.'" + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_newsletter_block_locales_locale_parent_id_uniqu": { + "name": "pages_blocks_newsletter_block_locales_locale_parent_id_uniqu", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_newsletter_block_locales_parent_id_fk": { + "name": "pages_blocks_newsletter_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_newsletter_block_locales", + "tableTo": "pages_blocks_newsletter_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_process_steps_block_steps": { + "name": "pages_blocks_process_steps_block_steps", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_process_steps_block_steps_order_idx": { + "name": "pages_blocks_process_steps_block_steps_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_process_steps_block_steps_parent_id_idx": { + "name": "pages_blocks_process_steps_block_steps_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_process_steps_block_steps_image_idx": { + "name": "pages_blocks_process_steps_block_steps_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_process_steps_block_steps_image_id_media_id_fk": { + "name": "pages_blocks_process_steps_block_steps_image_id_media_id_fk", + "tableFrom": "pages_blocks_process_steps_block_steps", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_process_steps_block_steps_parent_id_fk": { + "name": "pages_blocks_process_steps_block_steps_parent_id_fk", + "tableFrom": "pages_blocks_process_steps_block_steps", + "tableTo": "pages_blocks_process_steps_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_process_steps_block_steps_locales": { + "name": "pages_blocks_process_steps_block_steps_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_process_steps_block_steps_locales_locale_parent": { + "name": "pages_blocks_process_steps_block_steps_locales_locale_parent", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_process_steps_block_steps_locales_parent_id_fk": { + "name": "pages_blocks_process_steps_block_steps_locales_parent_id_fk", + "tableFrom": "pages_blocks_process_steps_block_steps_locales", + "tableTo": "pages_blocks_process_steps_block_steps", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_process_steps_block": { + "name": "pages_blocks_process_steps_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "layout": { + "name": "layout", + "type": "enum_pages_blocks_process_steps_block_layout", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'horizontal'" + }, + "show_numbers": { + "name": "show_numbers", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "show_icons": { + "name": "show_icons", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "cta_show": { + "name": "cta_show", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "cta_href": { + "name": "cta_href", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_variant": { + "name": "cta_variant", + "type": "enum_pages_blocks_process_steps_block_cta_variant", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'default'" + }, + "background_color": { + "name": "background_color", + "type": "enum_pages_blocks_process_steps_block_background_color", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'white'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_process_steps_block_order_idx": { + "name": "pages_blocks_process_steps_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_process_steps_block_parent_id_idx": { + "name": "pages_blocks_process_steps_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_process_steps_block_path_idx": { + "name": "pages_blocks_process_steps_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_process_steps_block_parent_id_fk": { + "name": "pages_blocks_process_steps_block_parent_id_fk", + "tableFrom": "pages_blocks_process_steps_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_process_steps_block_locales": { + "name": "pages_blocks_process_steps_block_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'So funktioniert es'" + }, + "subtitle": { + "name": "subtitle", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cta_label": { + "name": "cta_label", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Jetzt starten'" + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_blocks_process_steps_block_locales_locale_parent_id_un": { + "name": "pages_blocks_process_steps_block_locales_locale_parent_id_un", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_process_steps_block_locales_parent_id_fk": { + "name": "pages_blocks_process_steps_block_locales_parent_id_fk", + "tableFrom": "pages_blocks_process_steps_block_locales", + "tableTo": "pages_blocks_process_steps_block", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages": { + "name": "pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "hero_image_id": { + "name": "hero_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "seo_og_image_id": { + "name": "seo_og_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_pages_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "published_at": { + "name": "published_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "pages_tenant_idx": { + "name": "pages_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_hero_hero_image_idx": { + "name": "pages_hero_hero_image_idx", + "columns": [ + { + "expression": "hero_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_seo_seo_og_image_idx": { + "name": "pages_seo_seo_og_image_idx", + "columns": [ + { + "expression": "seo_og_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_updated_at_idx": { + "name": "pages_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_created_at_idx": { + "name": "pages_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_tenant_id_tenants_id_fk": { + "name": "pages_tenant_id_tenants_id_fk", + "tableFrom": "pages", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_hero_image_id_media_id_fk": { + "name": "pages_hero_image_id_media_id_fk", + "tableFrom": "pages", + "tableTo": "media", + "columnsFrom": [ + "hero_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_seo_og_image_id_media_id_fk": { + "name": "pages_seo_og_image_id_media_id_fk", + "tableFrom": "pages", + "tableTo": "media", + "columnsFrom": [ + "seo_og_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_locales": { + "name": "pages_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "hero_headline": { + "name": "hero_headline", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_subline": { + "name": "hero_subline", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "seo_meta_title": { + "name": "seo_meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "seo_meta_description": { + "name": "seo_meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "pages_locales_locale_parent_id_unique": { + "name": "pages_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_locales_parent_id_fk": { + "name": "pages_locales_parent_id_fk", + "tableFrom": "pages_locales", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_rels": { + "name": "pages_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "categories_id": { + "name": "categories_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "testimonials_id": { + "name": "testimonials_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_rels_order_idx": { + "name": "pages_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_rels_parent_idx": { + "name": "pages_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_rels_path_idx": { + "name": "pages_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_rels_categories_id_idx": { + "name": "pages_rels_categories_id_idx", + "columns": [ + { + "expression": "categories_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_rels_testimonials_id_idx": { + "name": "pages_rels_testimonials_id_idx", + "columns": [ + { + "expression": "testimonials_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_rels_parent_fk": { + "name": "pages_rels_parent_fk", + "tableFrom": "pages_rels", + "tableTo": "pages", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pages_rels_categories_fk": { + "name": "pages_rels_categories_fk", + "tableFrom": "pages_rels", + "tableTo": "categories", + "columnsFrom": [ + "categories_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pages_rels_testimonials_fk": { + "name": "pages_rels_testimonials_fk", + "tableFrom": "pages_rels", + "tableTo": "testimonials", + "columnsFrom": [ + "testimonials_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.posts": { + "name": "posts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "enum_posts_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'blog'" + }, + "is_featured": { + "name": "is_featured", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "featured_image_id": { + "name": "featured_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "author": { + "name": "author", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_posts_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "published_at": { + "name": "published_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "seo_og_image_id": { + "name": "seo_og_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "posts_tenant_idx": { + "name": "posts_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_featured_image_idx": { + "name": "posts_featured_image_idx", + "columns": [ + { + "expression": "featured_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_seo_seo_og_image_idx": { + "name": "posts_seo_seo_og_image_idx", + "columns": [ + { + "expression": "seo_og_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_updated_at_idx": { + "name": "posts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_created_at_idx": { + "name": "posts_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "posts_tenant_id_tenants_id_fk": { + "name": "posts_tenant_id_tenants_id_fk", + "tableFrom": "posts", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "posts_featured_image_id_media_id_fk": { + "name": "posts_featured_image_id_media_id_fk", + "tableFrom": "posts", + "tableTo": "media", + "columnsFrom": [ + "featured_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "posts_seo_og_image_id_media_id_fk": { + "name": "posts_seo_og_image_id_media_id_fk", + "tableFrom": "posts", + "tableTo": "media", + "columnsFrom": [ + "seo_og_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.posts_locales": { + "name": "posts_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "excerpt": { + "name": "excerpt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "seo_meta_title": { + "name": "seo_meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "seo_meta_description": { + "name": "seo_meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "posts_locales_locale_parent_id_unique": { + "name": "posts_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "posts_locales_parent_id_fk": { + "name": "posts_locales_parent_id_fk", + "tableFrom": "posts_locales", + "tableTo": "posts", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.posts_rels": { + "name": "posts_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "categories_id": { + "name": "categories_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "posts_rels_order_idx": { + "name": "posts_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_rels_parent_idx": { + "name": "posts_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_rels_path_idx": { + "name": "posts_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_rels_categories_id_idx": { + "name": "posts_rels_categories_id_idx", + "columns": [ + { + "expression": "categories_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "posts_rels_parent_fk": { + "name": "posts_rels_parent_fk", + "tableFrom": "posts_rels", + "tableTo": "posts", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "posts_rels_categories_fk": { + "name": "posts_rels_categories_fk", + "tableFrom": "posts_rels", + "tableTo": "categories", + "columnsFrom": [ + "categories_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.categories": { + "name": "categories", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "categories_tenant_idx": { + "name": "categories_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "categories_updated_at_idx": { + "name": "categories_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "categories_created_at_idx": { + "name": "categories_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "categories_tenant_id_tenants_id_fk": { + "name": "categories_tenant_id_tenants_id_fk", + "tableFrom": "categories", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.categories_locales": { + "name": "categories_locales", + "schema": "", + "columns": { + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "categories_locales_locale_parent_id_unique": { + "name": "categories_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "categories_locales_parent_id_fk": { + "name": "categories_locales_parent_id_fk", + "tableFrom": "categories_locales", + "tableTo": "categories", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.social_links": { + "name": "social_links", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "platform": { + "name": "platform", + "type": "enum_social_links_platform", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "social_links_tenant_idx": { + "name": "social_links_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "social_links_updated_at_idx": { + "name": "social_links_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "social_links_created_at_idx": { + "name": "social_links_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "social_links_tenant_id_tenants_id_fk": { + "name": "social_links_tenant_id_tenants_id_fk", + "tableFrom": "social_links", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.testimonials": { + "name": "testimonials", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "author": { + "name": "author", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "company": { + "name": "company", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rating": { + "name": "rating", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "source_url": { + "name": "source_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date": { + "name": "date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "order": { + "name": "order", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "testimonials_tenant_idx": { + "name": "testimonials_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "testimonials_image_idx": { + "name": "testimonials_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "testimonials_updated_at_idx": { + "name": "testimonials_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "testimonials_created_at_idx": { + "name": "testimonials_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "testimonials_tenant_id_tenants_id_fk": { + "name": "testimonials_tenant_id_tenants_id_fk", + "tableFrom": "testimonials", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "testimonials_image_id_media_id_fk": { + "name": "testimonials_image_id_media_id_fk", + "tableFrom": "testimonials", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.testimonials_locales": { + "name": "testimonials_locales", + "schema": "", + "columns": { + "quote": { + "name": "quote", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "testimonials_locales_locale_parent_id_unique": { + "name": "testimonials_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "testimonials_locales_parent_id_fk": { + "name": "testimonials_locales_parent_id_fk", + "tableFrom": "testimonials_locales", + "tableTo": "testimonials", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.newsletter_subscribers_interests": { + "name": "newsletter_subscribers_interests", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_newsletter_subscribers_interests", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "newsletter_subscribers_interests_order_idx": { + "name": "newsletter_subscribers_interests_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "newsletter_subscribers_interests_parent_idx": { + "name": "newsletter_subscribers_interests_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "newsletter_subscribers_interests_parent_fk": { + "name": "newsletter_subscribers_interests_parent_fk", + "tableFrom": "newsletter_subscribers_interests", + "tableTo": "newsletter_subscribers", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.newsletter_subscribers": { + "name": "newsletter_subscribers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "first_name": { + "name": "first_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "last_name": { + "name": "last_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_newsletter_subscribers_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "source": { + "name": "source", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "subscribed_at": { + "name": "subscribed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "confirmed_at": { + "name": "confirmed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "unsubscribed_at": { + "name": "unsubscribed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "confirmation_token": { + "name": "confirmation_token", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "ip_address": { + "name": "ip_address", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "newsletter_subscribers_tenant_idx": { + "name": "newsletter_subscribers_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "newsletter_subscribers_updated_at_idx": { + "name": "newsletter_subscribers_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "newsletter_subscribers_created_at_idx": { + "name": "newsletter_subscribers_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "newsletter_subscribers_tenant_id_tenants_id_fk": { + "name": "newsletter_subscribers_tenant_id_tenants_id_fk", + "tableFrom": "newsletter_subscribers", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.portfolio_categories": { + "name": "portfolio_categories", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "portfolio_categories_tenant_idx": { + "name": "portfolio_categories_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "portfolio_categories_cover_image_idx": { + "name": "portfolio_categories_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "portfolio_categories_updated_at_idx": { + "name": "portfolio_categories_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "portfolio_categories_created_at_idx": { + "name": "portfolio_categories_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "portfolio_categories_tenant_id_tenants_id_fk": { + "name": "portfolio_categories_tenant_id_tenants_id_fk", + "tableFrom": "portfolio_categories", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "portfolio_categories_cover_image_id_media_id_fk": { + "name": "portfolio_categories_cover_image_id_media_id_fk", + "tableFrom": "portfolio_categories", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.portfolio_categories_locales": { + "name": "portfolio_categories_locales", + "schema": "", + "columns": { + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "portfolio_categories_locales_locale_parent_id_unique": { + "name": "portfolio_categories_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "portfolio_categories_locales_parent_id_fk": { + "name": "portfolio_categories_locales_parent_id_fk", + "tableFrom": "portfolio_categories_locales", + "tableTo": "portfolio_categories", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.portfolios_images": { + "name": "portfolios_images", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "is_highlight": { + "name": "is_highlight", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "portfolios_images_order_idx": { + "name": "portfolios_images_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "portfolios_images_parent_id_idx": { + "name": "portfolios_images_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "portfolios_images_image_idx": { + "name": "portfolios_images_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "portfolios_images_image_id_media_id_fk": { + "name": "portfolios_images_image_id_media_id_fk", + "tableFrom": "portfolios_images", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "portfolios_images_parent_id_fk": { + "name": "portfolios_images_parent_id_fk", + "tableFrom": "portfolios_images", + "tableTo": "portfolios", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.portfolios_images_locales": { + "name": "portfolios_images_locales", + "schema": "", + "columns": { + "caption": { + "name": "caption", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "portfolios_images_locales_locale_parent_id_unique": { + "name": "portfolios_images_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "portfolios_images_locales_parent_id_fk": { + "name": "portfolios_images_locales_parent_id_fk", + "tableFrom": "portfolios_images_locales", + "tableTo": "portfolios_images", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.portfolios": { + "name": "portfolios", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "category_id": { + "name": "category_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "project_details_client": { + "name": "project_details_client", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "project_details_shooting_date": { + "name": "project_details_shooting_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_portfolios_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'draft'" + }, + "is_featured": { + "name": "is_featured", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "published_at": { + "name": "published_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "seo_og_image_id": { + "name": "seo_og_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "portfolios_tenant_idx": { + "name": "portfolios_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "portfolios_category_idx": { + "name": "portfolios_category_idx", + "columns": [ + { + "expression": "category_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "portfolios_cover_image_idx": { + "name": "portfolios_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "portfolios_seo_seo_og_image_idx": { + "name": "portfolios_seo_seo_og_image_idx", + "columns": [ + { + "expression": "seo_og_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "portfolios_updated_at_idx": { + "name": "portfolios_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "portfolios_created_at_idx": { + "name": "portfolios_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "portfolios_tenant_id_tenants_id_fk": { + "name": "portfolios_tenant_id_tenants_id_fk", + "tableFrom": "portfolios", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "portfolios_category_id_portfolio_categories_id_fk": { + "name": "portfolios_category_id_portfolio_categories_id_fk", + "tableFrom": "portfolios", + "tableTo": "portfolio_categories", + "columnsFrom": [ + "category_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "portfolios_cover_image_id_media_id_fk": { + "name": "portfolios_cover_image_id_media_id_fk", + "tableFrom": "portfolios", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "portfolios_seo_og_image_id_media_id_fk": { + "name": "portfolios_seo_og_image_id_media_id_fk", + "tableFrom": "portfolios", + "tableTo": "media", + "columnsFrom": [ + "seo_og_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.portfolios_locales": { + "name": "portfolios_locales", + "schema": "", + "columns": { + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "excerpt": { + "name": "excerpt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "project_details_location": { + "name": "project_details_location", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "seo_meta_title": { + "name": "seo_meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "seo_meta_description": { + "name": "seo_meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "portfolios_locales_locale_parent_id_unique": { + "name": "portfolios_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "portfolios_locales_parent_id_fk": { + "name": "portfolios_locales_parent_id_fk", + "tableFrom": "portfolios_locales", + "tableTo": "portfolios", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.portfolios_texts": { + "name": "portfolios_texts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "portfolios_texts_order_parent": { + "name": "portfolios_texts_order_parent", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "portfolios_texts_parent_fk": { + "name": "portfolios_texts_parent_fk", + "tableFrom": "portfolios_texts", + "tableTo": "portfolios", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cookie_configurations_enabled_categories": { + "name": "cookie_configurations_enabled_categories", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_cookie_configurations_enabled_categories", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "cookie_configurations_enabled_categories_order_idx": { + "name": "cookie_configurations_enabled_categories_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "cookie_configurations_enabled_categories_parent_idx": { + "name": "cookie_configurations_enabled_categories_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "cookie_configurations_enabled_categories_parent_fk": { + "name": "cookie_configurations_enabled_categories_parent_fk", + "tableFrom": "cookie_configurations_enabled_categories", + "tableTo": "cookie_configurations", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cookie_configurations": { + "name": "cookie_configurations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Cookie-Einstellungen'" + }, + "revision": { + "name": "revision", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "translations_de_banner_title": { + "name": "translations_de_banner_title", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Wir respektieren Ihre Privatsphäre'" + }, + "translations_de_banner_description": { + "name": "translations_de_banner_description", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Diese Website verwendet Cookies, um Ihnen die bestmögliche Erfahrung zu bieten.'" + }, + "translations_de_accept_all_button": { + "name": "translations_de_accept_all_button", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Alle akzeptieren'" + }, + "translations_de_accept_necessary_button": { + "name": "translations_de_accept_necessary_button", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Nur notwendige'" + }, + "translations_de_settings_button": { + "name": "translations_de_settings_button", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Einstellungen'" + }, + "translations_de_save_button": { + "name": "translations_de_save_button", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Auswahl speichern'" + }, + "translations_de_privacy_policy_url": { + "name": "translations_de_privacy_policy_url", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'/datenschutz'" + }, + "translations_de_category_labels_necessary_title": { + "name": "translations_de_category_labels_necessary_title", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Notwendig'" + }, + "translations_de_category_labels_necessary_description": { + "name": "translations_de_category_labels_necessary_description", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Diese Cookies sind für die Grundfunktionen der Website erforderlich.'" + }, + "translations_de_category_labels_functional_title": { + "name": "translations_de_category_labels_functional_title", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Funktional'" + }, + "translations_de_category_labels_functional_description": { + "name": "translations_de_category_labels_functional_description", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Diese Cookies ermöglichen erweiterte Funktionen.'" + }, + "translations_de_category_labels_analytics_title": { + "name": "translations_de_category_labels_analytics_title", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Statistik'" + }, + "translations_de_category_labels_analytics_description": { + "name": "translations_de_category_labels_analytics_description", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Diese Cookies helfen uns zu verstehen, wie Besucher die Website nutzen.'" + }, + "translations_de_category_labels_marketing_title": { + "name": "translations_de_category_labels_marketing_title", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Marketing'" + }, + "translations_de_category_labels_marketing_description": { + "name": "translations_de_category_labels_marketing_description", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Diese Cookies werden für Werbezwecke verwendet.'" + }, + "styling_position": { + "name": "styling_position", + "type": "enum_cookie_configurations_styling_position", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'bottom'" + }, + "styling_theme": { + "name": "styling_theme", + "type": "enum_cookie_configurations_styling_theme", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'dark'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "cookie_configurations_tenant_idx": { + "name": "cookie_configurations_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "cookie_configurations_updated_at_idx": { + "name": "cookie_configurations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "cookie_configurations_created_at_idx": { + "name": "cookie_configurations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "cookie_configurations_tenant_id_tenants_id_fk": { + "name": "cookie_configurations_tenant_id_tenants_id_fk", + "tableFrom": "cookie_configurations", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cookie_inventory": { + "name": "cookie_inventory", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "provider": { + "name": "provider", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_cookie_inventory_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "duration": { + "name": "duration", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "cookie_inventory_tenant_idx": { + "name": "cookie_inventory_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "cookie_inventory_updated_at_idx": { + "name": "cookie_inventory_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "cookie_inventory_created_at_idx": { + "name": "cookie_inventory_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "cookie_inventory_tenant_id_tenants_id_fk": { + "name": "cookie_inventory_tenant_id_tenants_id_fk", + "tableFrom": "cookie_inventory", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.consent_logs": { + "name": "consent_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "consent_id": { + "name": "consent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "client_ref": { + "name": "client_ref", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "categories": { + "name": "categories", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "user_agent": { + "name": "user_agent", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "anonymized_ip": { + "name": "anonymized_ip", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "consent_logs_consent_id_idx": { + "name": "consent_logs_consent_id_idx", + "columns": [ + { + "expression": "consent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "consent_logs_tenant_idx": { + "name": "consent_logs_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "consent_logs_updated_at_idx": { + "name": "consent_logs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "consent_logs_created_at_idx": { + "name": "consent_logs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "consent_logs_tenant_id_tenants_id_fk": { + "name": "consent_logs_tenant_id_tenants_id_fk", + "tableFrom": "consent_logs", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.privacy_policy_settings": { + "name": "privacy_policy_settings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Datenschutzerklärung'" + }, + "provider": { + "name": "provider", + "type": "enum_privacy_policy_settings_provider", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'alfright'" + }, + "alfright_tenant_id": { + "name": "alfright_tenant_id", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'alfright_schutzteam'" + }, + "alfright_api_key": { + "name": "alfright_api_key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "alfright_language": { + "name": "alfright_language", + "type": "enum_privacy_policy_settings_alfright_language", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'de-de'" + }, + "alfright_iframe_height": { + "name": "alfright_iframe_height", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 4000 + }, + "styling_header_color": { + "name": "styling_header_color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#ca8a04'" + }, + "styling_header_font": { + "name": "styling_header_font", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Inter, sans-serif'" + }, + "styling_header_size": { + "name": "styling_header_size", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'24px'" + }, + "styling_subheader_size": { + "name": "styling_subheader_size", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'18px'" + }, + "styling_font_color": { + "name": "styling_font_color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#f3f4f6'" + }, + "styling_text_font": { + "name": "styling_text_font", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Inter, sans-serif'" + }, + "styling_text_size": { + "name": "styling_text_size", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'16px'" + }, + "styling_link_color": { + "name": "styling_link_color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#ca8a04'" + }, + "styling_background_color": { + "name": "styling_background_color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#111827'" + }, + "show_cookie_table": { + "name": "show_cookie_table", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "cookie_table_title": { + "name": "cookie_table_title", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Übersicht der verwendeten Cookies'" + }, + "cookie_table_description": { + "name": "cookie_table_description", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Ergänzend zur Datenschutzerklärung finden Sie hier eine detaillierte Übersicht aller auf dieser Website eingesetzten Cookies. Sie können Ihre Cookie-Einstellungen jederzeit über den Link \"Cookie-Einstellungen\" im Footer anpassen.'" + }, + "seo_meta_title": { + "name": "seo_meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Datenschutzerklärung'" + }, + "seo_meta_description": { + "name": "seo_meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Informationen zum Datenschutz und zur Verarbeitung Ihrer personenbezogenen Daten.'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "privacy_policy_settings_tenant_idx": { + "name": "privacy_policy_settings_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "privacy_policy_settings_updated_at_idx": { + "name": "privacy_policy_settings_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "privacy_policy_settings_created_at_idx": { + "name": "privacy_policy_settings_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "privacy_policy_settings_tenant_id_tenants_id_fk": { + "name": "privacy_policy_settings_tenant_id_tenants_id_fk", + "tableFrom": "privacy_policy_settings", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.email_logs": { + "name": "email_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "to": { + "name": "to", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "from": { + "name": "from", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "subject": { + "name": "subject", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_email_logs_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "message_id": { + "name": "message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "enum_email_logs_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'manual'" + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "email_logs_tenant_idx": { + "name": "email_logs_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "email_logs_updated_at_idx": { + "name": "email_logs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "email_logs_created_at_idx": { + "name": "email_logs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "email_logs_tenant_id_tenants_id_fk": { + "name": "email_logs_tenant_id_tenants_id_fk", + "tableFrom": "email_logs", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.audit_logs": { + "name": "audit_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "action": { + "name": "action", + "type": "enum_audit_logs_action", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "severity": { + "name": "severity", + "type": "enum_audit_logs_severity", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'info'" + }, + "entity_type": { + "name": "entity_type", + "type": "enum_audit_logs_entity_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "user_email": { + "name": "user_email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tenant_id": { + "name": "tenant_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ip_address": { + "name": "ip_address", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "previous_value": { + "name": "previous_value", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "new_value": { + "name": "new_value", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "audit_logs_user_idx": { + "name": "audit_logs_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_logs_tenant_idx": { + "name": "audit_logs_tenant_idx", + "columns": [ + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_logs_updated_at_idx": { + "name": "audit_logs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_logs_created_at_idx": { + "name": "audit_logs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "audit_logs_user_id_users_id_fk": { + "name": "audit_logs_user_id_users_id_fk", + "tableFrom": "audit_logs", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "audit_logs_tenant_id_tenants_id_fk": { + "name": "audit_logs_tenant_id_tenants_id_fk", + "tableFrom": "audit_logs", + "tableTo": "tenants", + "columnsFrom": [ + "tenant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_checkbox": { + "name": "forms_blocks_checkbox", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "default_value": { + "name": "default_value", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_checkbox_order_idx": { + "name": "forms_blocks_checkbox_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_checkbox_parent_id_idx": { + "name": "forms_blocks_checkbox_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_checkbox_path_idx": { + "name": "forms_blocks_checkbox_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_checkbox_parent_id_fk": { + "name": "forms_blocks_checkbox_parent_id_fk", + "tableFrom": "forms_blocks_checkbox", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_checkbox_locales": { + "name": "forms_blocks_checkbox_locales", + "schema": "", + "columns": { + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "forms_blocks_checkbox_locales_locale_parent_id_unique": { + "name": "forms_blocks_checkbox_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_checkbox_locales_parent_id_fk": { + "name": "forms_blocks_checkbox_locales_parent_id_fk", + "tableFrom": "forms_blocks_checkbox_locales", + "tableTo": "forms_blocks_checkbox", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_email": { + "name": "forms_blocks_email", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_email_order_idx": { + "name": "forms_blocks_email_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_email_parent_id_idx": { + "name": "forms_blocks_email_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_email_path_idx": { + "name": "forms_blocks_email_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_email_parent_id_fk": { + "name": "forms_blocks_email_parent_id_fk", + "tableFrom": "forms_blocks_email", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_email_locales": { + "name": "forms_blocks_email_locales", + "schema": "", + "columns": { + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "forms_blocks_email_locales_locale_parent_id_unique": { + "name": "forms_blocks_email_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_email_locales_parent_id_fk": { + "name": "forms_blocks_email_locales_parent_id_fk", + "tableFrom": "forms_blocks_email_locales", + "tableTo": "forms_blocks_email", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_message": { + "name": "forms_blocks_message", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_message_order_idx": { + "name": "forms_blocks_message_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_message_parent_id_idx": { + "name": "forms_blocks_message_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_message_path_idx": { + "name": "forms_blocks_message_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_message_parent_id_fk": { + "name": "forms_blocks_message_parent_id_fk", + "tableFrom": "forms_blocks_message", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_message_locales": { + "name": "forms_blocks_message_locales", + "schema": "", + "columns": { + "message": { + "name": "message", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "forms_blocks_message_locales_locale_parent_id_unique": { + "name": "forms_blocks_message_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_message_locales_parent_id_fk": { + "name": "forms_blocks_message_locales_parent_id_fk", + "tableFrom": "forms_blocks_message_locales", + "tableTo": "forms_blocks_message", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_number": { + "name": "forms_blocks_number", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_value": { + "name": "default_value", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_number_order_idx": { + "name": "forms_blocks_number_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_number_parent_id_idx": { + "name": "forms_blocks_number_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_number_path_idx": { + "name": "forms_blocks_number_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_number_parent_id_fk": { + "name": "forms_blocks_number_parent_id_fk", + "tableFrom": "forms_blocks_number", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_number_locales": { + "name": "forms_blocks_number_locales", + "schema": "", + "columns": { + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "forms_blocks_number_locales_locale_parent_id_unique": { + "name": "forms_blocks_number_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_number_locales_parent_id_fk": { + "name": "forms_blocks_number_locales_parent_id_fk", + "tableFrom": "forms_blocks_number_locales", + "tableTo": "forms_blocks_number", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_select_options": { + "name": "forms_blocks_select_options", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "forms_blocks_select_options_order_idx": { + "name": "forms_blocks_select_options_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_select_options_parent_id_idx": { + "name": "forms_blocks_select_options_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_select_options_parent_id_fk": { + "name": "forms_blocks_select_options_parent_id_fk", + "tableFrom": "forms_blocks_select_options", + "tableTo": "forms_blocks_select", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_select_options_locales": { + "name": "forms_blocks_select_options_locales", + "schema": "", + "columns": { + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "forms_blocks_select_options_locales_locale_parent_id_unique": { + "name": "forms_blocks_select_options_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_select_options_locales_parent_id_fk": { + "name": "forms_blocks_select_options_locales_parent_id_fk", + "tableFrom": "forms_blocks_select_options_locales", + "tableTo": "forms_blocks_select_options", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_select": { + "name": "forms_blocks_select", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_select_order_idx": { + "name": "forms_blocks_select_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_select_parent_id_idx": { + "name": "forms_blocks_select_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_select_path_idx": { + "name": "forms_blocks_select_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_select_parent_id_fk": { + "name": "forms_blocks_select_parent_id_fk", + "tableFrom": "forms_blocks_select", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_select_locales": { + "name": "forms_blocks_select_locales", + "schema": "", + "columns": { + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "default_value": { + "name": "default_value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "forms_blocks_select_locales_locale_parent_id_unique": { + "name": "forms_blocks_select_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_select_locales_parent_id_fk": { + "name": "forms_blocks_select_locales_parent_id_fk", + "tableFrom": "forms_blocks_select_locales", + "tableTo": "forms_blocks_select", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_text": { + "name": "forms_blocks_text", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_text_order_idx": { + "name": "forms_blocks_text_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_text_parent_id_idx": { + "name": "forms_blocks_text_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_text_path_idx": { + "name": "forms_blocks_text_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_text_parent_id_fk": { + "name": "forms_blocks_text_parent_id_fk", + "tableFrom": "forms_blocks_text", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_text_locales": { + "name": "forms_blocks_text_locales", + "schema": "", + "columns": { + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "default_value": { + "name": "default_value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "forms_blocks_text_locales_locale_parent_id_unique": { + "name": "forms_blocks_text_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_text_locales_parent_id_fk": { + "name": "forms_blocks_text_locales_parent_id_fk", + "tableFrom": "forms_blocks_text_locales", + "tableTo": "forms_blocks_text", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_textarea": { + "name": "forms_blocks_textarea", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_textarea_order_idx": { + "name": "forms_blocks_textarea_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_textarea_parent_id_idx": { + "name": "forms_blocks_textarea_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_textarea_path_idx": { + "name": "forms_blocks_textarea_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_textarea_parent_id_fk": { + "name": "forms_blocks_textarea_parent_id_fk", + "tableFrom": "forms_blocks_textarea", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_textarea_locales": { + "name": "forms_blocks_textarea_locales", + "schema": "", + "columns": { + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "default_value": { + "name": "default_value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "forms_blocks_textarea_locales_locale_parent_id_unique": { + "name": "forms_blocks_textarea_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_textarea_locales_parent_id_fk": { + "name": "forms_blocks_textarea_locales_parent_id_fk", + "tableFrom": "forms_blocks_textarea_locales", + "tableTo": "forms_blocks_textarea", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_emails": { + "name": "forms_emails", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "email_to": { + "name": "email_to", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cc": { + "name": "cc", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bcc": { + "name": "bcc", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reply_to": { + "name": "reply_to", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "email_from": { + "name": "email_from", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_emails_order_idx": { + "name": "forms_emails_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_emails_parent_id_idx": { + "name": "forms_emails_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_emails_parent_id_fk": { + "name": "forms_emails_parent_id_fk", + "tableFrom": "forms_emails", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_emails_locales": { + "name": "forms_emails_locales", + "schema": "", + "columns": { + "subject": { + "name": "subject", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'You''ve received a new message.'" + }, + "message": { + "name": "message", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "forms_emails_locales_locale_parent_id_unique": { + "name": "forms_emails_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_emails_locales_parent_id_fk": { + "name": "forms_emails_locales_parent_id_fk", + "tableFrom": "forms_emails_locales", + "tableTo": "forms_emails", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms": { + "name": "forms", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "confirmation_type": { + "name": "confirmation_type", + "type": "enum_forms_confirmation_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'message'" + }, + "redirect_type": { + "name": "redirect_type", + "type": "enum_forms_redirect_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'reference'" + }, + "redirect_url": { + "name": "redirect_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "forms_updated_at_idx": { + "name": "forms_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_created_at_idx": { + "name": "forms_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_locales": { + "name": "forms_locales", + "schema": "", + "columns": { + "submit_button_label": { + "name": "submit_button_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "confirmation_message": { + "name": "confirmation_message", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "forms_locales_locale_parent_id_unique": { + "name": "forms_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_locales_parent_id_fk": { + "name": "forms_locales_parent_id_fk", + "tableFrom": "forms_locales", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_rels": { + "name": "forms_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_rels_order_idx": { + "name": "forms_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_rels_parent_idx": { + "name": "forms_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_rels_path_idx": { + "name": "forms_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_rels_pages_id_idx": { + "name": "forms_rels_pages_id_idx", + "columns": [ + { + "expression": "pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_rels_parent_fk": { + "name": "forms_rels_parent_fk", + "tableFrom": "forms_rels", + "tableTo": "forms", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "forms_rels_pages_fk": { + "name": "forms_rels_pages_fk", + "tableFrom": "forms_rels", + "tableTo": "pages", + "columnsFrom": [ + "pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.form_submissions_submission_data": { + "name": "form_submissions_submission_data", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "field": { + "name": "field", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "form_submissions_submission_data_order_idx": { + "name": "form_submissions_submission_data_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "form_submissions_submission_data_parent_id_idx": { + "name": "form_submissions_submission_data_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "form_submissions_submission_data_parent_id_fk": { + "name": "form_submissions_submission_data_parent_id_fk", + "tableFrom": "form_submissions_submission_data", + "tableTo": "form_submissions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.form_submissions": { + "name": "form_submissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "form_id": { + "name": "form_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "form_submissions_form_idx": { + "name": "form_submissions_form_idx", + "columns": [ + { + "expression": "form_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "form_submissions_updated_at_idx": { + "name": "form_submissions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "form_submissions_created_at_idx": { + "name": "form_submissions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "form_submissions_form_id_forms_id_fk": { + "name": "form_submissions_form_id_forms_id_fk", + "tableFrom": "form_submissions", + "tableTo": "forms", + "columnsFrom": [ + "form_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.redirects": { + "name": "redirects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "from": { + "name": "from", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "to_type": { + "name": "to_type", + "type": "enum_redirects_to_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'reference'" + }, + "to_url": { + "name": "to_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "redirects_from_idx": { + "name": "redirects_from_idx", + "columns": [ + { + "expression": "from", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "redirects_updated_at_idx": { + "name": "redirects_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "redirects_created_at_idx": { + "name": "redirects_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.redirects_rels": { + "name": "redirects_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "redirects_rels_order_idx": { + "name": "redirects_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "redirects_rels_parent_idx": { + "name": "redirects_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "redirects_rels_path_idx": { + "name": "redirects_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "redirects_rels_pages_id_idx": { + "name": "redirects_rels_pages_id_idx", + "columns": [ + { + "expression": "pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "redirects_rels_parent_fk": { + "name": "redirects_rels_parent_fk", + "tableFrom": "redirects_rels", + "tableTo": "redirects", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "redirects_rels_pages_fk": { + "name": "redirects_rels_pages_fk", + "tableFrom": "redirects_rels", + "tableTo": "pages", + "columnsFrom": [ + "pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_kv": { + "name": "payload_kv", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "payload_kv_key_idx": { + "name": "payload_kv_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents": { + "name": "payload_locked_documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "global_slug": { + "name": "global_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_locked_documents_global_slug_idx": { + "name": "payload_locked_documents_global_slug_idx", + "columns": [ + { + "expression": "global_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_updated_at_idx": { + "name": "payload_locked_documents_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_created_at_idx": { + "name": "payload_locked_documents_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents_rels": { + "name": "payload_locked_documents_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tenants_id": { + "name": "tenants_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "categories_id": { + "name": "categories_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "social_links_id": { + "name": "social_links_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "testimonials_id": { + "name": "testimonials_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "newsletter_subscribers_id": { + "name": "newsletter_subscribers_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "portfolio_categories_id": { + "name": "portfolio_categories_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "portfolios_id": { + "name": "portfolios_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cookie_configurations_id": { + "name": "cookie_configurations_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cookie_inventory_id": { + "name": "cookie_inventory_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "consent_logs_id": { + "name": "consent_logs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "privacy_policy_settings_id": { + "name": "privacy_policy_settings_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "email_logs_id": { + "name": "email_logs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "audit_logs_id": { + "name": "audit_logs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "forms_id": { + "name": "forms_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "form_submissions_id": { + "name": "form_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "redirects_id": { + "name": "redirects_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_locked_documents_rels_order_idx": { + "name": "payload_locked_documents_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_parent_idx": { + "name": "payload_locked_documents_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_path_idx": { + "name": "payload_locked_documents_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_users_id_idx": { + "name": "payload_locked_documents_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_media_id_idx": { + "name": "payload_locked_documents_rels_media_id_idx", + "columns": [ + { + "expression": "media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_tenants_id_idx": { + "name": "payload_locked_documents_rels_tenants_id_idx", + "columns": [ + { + "expression": "tenants_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_pages_id_idx": { + "name": "payload_locked_documents_rels_pages_id_idx", + "columns": [ + { + "expression": "pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_posts_id_idx": { + "name": "payload_locked_documents_rels_posts_id_idx", + "columns": [ + { + "expression": "posts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_categories_id_idx": { + "name": "payload_locked_documents_rels_categories_id_idx", + "columns": [ + { + "expression": "categories_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_social_links_id_idx": { + "name": "payload_locked_documents_rels_social_links_id_idx", + "columns": [ + { + "expression": "social_links_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_testimonials_id_idx": { + "name": "payload_locked_documents_rels_testimonials_id_idx", + "columns": [ + { + "expression": "testimonials_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_newsletter_subscribers_id_idx": { + "name": "payload_locked_documents_rels_newsletter_subscribers_id_idx", + "columns": [ + { + "expression": "newsletter_subscribers_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_portfolio_categories_id_idx": { + "name": "payload_locked_documents_rels_portfolio_categories_id_idx", + "columns": [ + { + "expression": "portfolio_categories_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_portfolios_id_idx": { + "name": "payload_locked_documents_rels_portfolios_id_idx", + "columns": [ + { + "expression": "portfolios_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_cookie_configurations_id_idx": { + "name": "payload_locked_documents_rels_cookie_configurations_id_idx", + "columns": [ + { + "expression": "cookie_configurations_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_cookie_inventory_id_idx": { + "name": "payload_locked_documents_rels_cookie_inventory_id_idx", + "columns": [ + { + "expression": "cookie_inventory_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_consent_logs_id_idx": { + "name": "payload_locked_documents_rels_consent_logs_id_idx", + "columns": [ + { + "expression": "consent_logs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_privacy_policy_settings_id_idx": { + "name": "payload_locked_documents_rels_privacy_policy_settings_id_idx", + "columns": [ + { + "expression": "privacy_policy_settings_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_email_logs_id_idx": { + "name": "payload_locked_documents_rels_email_logs_id_idx", + "columns": [ + { + "expression": "email_logs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_audit_logs_id_idx": { + "name": "payload_locked_documents_rels_audit_logs_id_idx", + "columns": [ + { + "expression": "audit_logs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_forms_id_idx": { + "name": "payload_locked_documents_rels_forms_id_idx", + "columns": [ + { + "expression": "forms_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_form_submissions_id_idx": { + "name": "payload_locked_documents_rels_form_submissions_id_idx", + "columns": [ + { + "expression": "form_submissions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_redirects_id_idx": { + "name": "payload_locked_documents_rels_redirects_id_idx", + "columns": [ + { + "expression": "redirects_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_locked_documents_rels_parent_fk": { + "name": "payload_locked_documents_rels_parent_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_locked_documents", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_users_fk": { + "name": "payload_locked_documents_rels_users_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_media_fk": { + "name": "payload_locked_documents_rels_media_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "media", + "columnsFrom": [ + "media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_tenants_fk": { + "name": "payload_locked_documents_rels_tenants_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "tenants", + "columnsFrom": [ + "tenants_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_pages_fk": { + "name": "payload_locked_documents_rels_pages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "pages", + "columnsFrom": [ + "pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_posts_fk": { + "name": "payload_locked_documents_rels_posts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "posts", + "columnsFrom": [ + "posts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_categories_fk": { + "name": "payload_locked_documents_rels_categories_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "categories", + "columnsFrom": [ + "categories_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_social_links_fk": { + "name": "payload_locked_documents_rels_social_links_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "social_links", + "columnsFrom": [ + "social_links_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_testimonials_fk": { + "name": "payload_locked_documents_rels_testimonials_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "testimonials", + "columnsFrom": [ + "testimonials_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_newsletter_subscribers_fk": { + "name": "payload_locked_documents_rels_newsletter_subscribers_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "newsletter_subscribers", + "columnsFrom": [ + "newsletter_subscribers_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_portfolio_categories_fk": { + "name": "payload_locked_documents_rels_portfolio_categories_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "portfolio_categories", + "columnsFrom": [ + "portfolio_categories_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_portfolios_fk": { + "name": "payload_locked_documents_rels_portfolios_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "portfolios", + "columnsFrom": [ + "portfolios_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_cookie_configurations_fk": { + "name": "payload_locked_documents_rels_cookie_configurations_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "cookie_configurations", + "columnsFrom": [ + "cookie_configurations_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_cookie_inventory_fk": { + "name": "payload_locked_documents_rels_cookie_inventory_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "cookie_inventory", + "columnsFrom": [ + "cookie_inventory_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_consent_logs_fk": { + "name": "payload_locked_documents_rels_consent_logs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "consent_logs", + "columnsFrom": [ + "consent_logs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_privacy_policy_settings_fk": { + "name": "payload_locked_documents_rels_privacy_policy_settings_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "privacy_policy_settings", + "columnsFrom": [ + "privacy_policy_settings_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_email_logs_fk": { + "name": "payload_locked_documents_rels_email_logs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "email_logs", + "columnsFrom": [ + "email_logs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_audit_logs_fk": { + "name": "payload_locked_documents_rels_audit_logs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "audit_logs", + "columnsFrom": [ + "audit_logs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_forms_fk": { + "name": "payload_locked_documents_rels_forms_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "forms", + "columnsFrom": [ + "forms_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_form_submissions_fk": { + "name": "payload_locked_documents_rels_form_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "form_submissions", + "columnsFrom": [ + "form_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_redirects_fk": { + "name": "payload_locked_documents_rels_redirects_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "redirects", + "columnsFrom": [ + "redirects_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences": { + "name": "payload_preferences", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "value": { + "name": "value", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_preferences_key_idx": { + "name": "payload_preferences_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_updated_at_idx": { + "name": "payload_preferences_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_created_at_idx": { + "name": "payload_preferences_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences_rels": { + "name": "payload_preferences_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_preferences_rels_order_idx": { + "name": "payload_preferences_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_parent_idx": { + "name": "payload_preferences_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_path_idx": { + "name": "payload_preferences_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_users_id_idx": { + "name": "payload_preferences_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_preferences_rels_parent_fk": { + "name": "payload_preferences_rels_parent_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_preferences", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_users_fk": { + "name": "payload_preferences_rels_users_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_migrations": { + "name": "payload_migrations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "batch": { + "name": "batch", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_migrations_updated_at_idx": { + "name": "payload_migrations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_migrations_created_at_idx": { + "name": "payload_migrations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.site_settings": { + "name": "site_settings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "logo_id": { + "name": "logo_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "favicon_id": { + "name": "favicon_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "contact_email": { + "name": "contact_email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "contact_phone": { + "name": "contact_phone", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "contact_address": { + "name": "contact_address", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "footer_show_social_links": { + "name": "footer_show_social_links", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "seo_default_og_image_id": { + "name": "seo_default_og_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "site_settings_logo_idx": { + "name": "site_settings_logo_idx", + "columns": [ + { + "expression": "logo_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "site_settings_favicon_idx": { + "name": "site_settings_favicon_idx", + "columns": [ + { + "expression": "favicon_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "site_settings_seo_seo_default_og_image_idx": { + "name": "site_settings_seo_seo_default_og_image_idx", + "columns": [ + { + "expression": "seo_default_og_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "site_settings_logo_id_media_id_fk": { + "name": "site_settings_logo_id_media_id_fk", + "tableFrom": "site_settings", + "tableTo": "media", + "columnsFrom": [ + "logo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "site_settings_favicon_id_media_id_fk": { + "name": "site_settings_favicon_id_media_id_fk", + "tableFrom": "site_settings", + "tableTo": "media", + "columnsFrom": [ + "favicon_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "site_settings_seo_default_og_image_id_media_id_fk": { + "name": "site_settings_seo_default_og_image_id_media_id_fk", + "tableFrom": "site_settings", + "tableTo": "media", + "columnsFrom": [ + "seo_default_og_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.site_settings_locales": { + "name": "site_settings_locales", + "schema": "", + "columns": { + "site_name": { + "name": "site_name", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'porwoll.de'" + }, + "site_tagline": { + "name": "site_tagline", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "footer_copyright_text": { + "name": "footer_copyright_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "seo_default_meta_title": { + "name": "seo_default_meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "seo_default_meta_description": { + "name": "seo_default_meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "site_settings_locales_locale_parent_id_unique": { + "name": "site_settings_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "site_settings_locales_parent_id_fk": { + "name": "site_settings_locales_parent_id_fk", + "tableFrom": "site_settings_locales", + "tableTo": "site_settings", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.navigation_main_menu_submenu": { + "name": "navigation_main_menu_submenu", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "link_type": { + "name": "link_type", + "type": "enum_navigation_main_menu_submenu_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'page'" + }, + "page_id": { + "name": "page_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "navigation_main_menu_submenu_order_idx": { + "name": "navigation_main_menu_submenu_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "navigation_main_menu_submenu_parent_id_idx": { + "name": "navigation_main_menu_submenu_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "navigation_main_menu_submenu_page_idx": { + "name": "navigation_main_menu_submenu_page_idx", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "navigation_main_menu_submenu_page_id_pages_id_fk": { + "name": "navigation_main_menu_submenu_page_id_pages_id_fk", + "tableFrom": "navigation_main_menu_submenu", + "tableTo": "pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "navigation_main_menu_submenu_parent_id_fk": { + "name": "navigation_main_menu_submenu_parent_id_fk", + "tableFrom": "navigation_main_menu_submenu", + "tableTo": "navigation_main_menu", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.navigation_main_menu_submenu_locales": { + "name": "navigation_main_menu_submenu_locales", + "schema": "", + "columns": { + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "navigation_main_menu_submenu_locales_locale_parent_id_unique": { + "name": "navigation_main_menu_submenu_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "navigation_main_menu_submenu_locales_parent_id_fk": { + "name": "navigation_main_menu_submenu_locales_parent_id_fk", + "tableFrom": "navigation_main_menu_submenu_locales", + "tableTo": "navigation_main_menu_submenu", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.navigation_main_menu": { + "name": "navigation_main_menu", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_navigation_main_menu_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'page'" + }, + "page_id": { + "name": "page_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "open_in_new_tab": { + "name": "open_in_new_tab", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "navigation_main_menu_order_idx": { + "name": "navigation_main_menu_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "navigation_main_menu_parent_id_idx": { + "name": "navigation_main_menu_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "navigation_main_menu_page_idx": { + "name": "navigation_main_menu_page_idx", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "navigation_main_menu_page_id_pages_id_fk": { + "name": "navigation_main_menu_page_id_pages_id_fk", + "tableFrom": "navigation_main_menu", + "tableTo": "pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "navigation_main_menu_parent_id_fk": { + "name": "navigation_main_menu_parent_id_fk", + "tableFrom": "navigation_main_menu", + "tableTo": "navigation", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.navigation_main_menu_locales": { + "name": "navigation_main_menu_locales", + "schema": "", + "columns": { + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "navigation_main_menu_locales_locale_parent_id_unique": { + "name": "navigation_main_menu_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "navigation_main_menu_locales_parent_id_fk": { + "name": "navigation_main_menu_locales_parent_id_fk", + "tableFrom": "navigation_main_menu_locales", + "tableTo": "navigation_main_menu", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.navigation_footer_menu": { + "name": "navigation_footer_menu", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "link_type": { + "name": "link_type", + "type": "enum_navigation_footer_menu_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'page'" + }, + "page_id": { + "name": "page_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "navigation_footer_menu_order_idx": { + "name": "navigation_footer_menu_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "navigation_footer_menu_parent_id_idx": { + "name": "navigation_footer_menu_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "navigation_footer_menu_page_idx": { + "name": "navigation_footer_menu_page_idx", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "navigation_footer_menu_page_id_pages_id_fk": { + "name": "navigation_footer_menu_page_id_pages_id_fk", + "tableFrom": "navigation_footer_menu", + "tableTo": "pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "navigation_footer_menu_parent_id_fk": { + "name": "navigation_footer_menu_parent_id_fk", + "tableFrom": "navigation_footer_menu", + "tableTo": "navigation", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.navigation_footer_menu_locales": { + "name": "navigation_footer_menu_locales", + "schema": "", + "columns": { + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "navigation_footer_menu_locales_locale_parent_id_unique": { + "name": "navigation_footer_menu_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "navigation_footer_menu_locales_parent_id_fk": { + "name": "navigation_footer_menu_locales_parent_id_fk", + "tableFrom": "navigation_footer_menu_locales", + "tableTo": "navigation_footer_menu", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.navigation": { + "name": "navigation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.seo_settings_social_profiles": { + "name": "seo_settings_social_profiles", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "platform": { + "name": "platform", + "type": "enum_seo_settings_social_profiles_platform", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "seo_settings_social_profiles_order_idx": { + "name": "seo_settings_social_profiles_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "seo_settings_social_profiles_parent_id_idx": { + "name": "seo_settings_social_profiles_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "seo_settings_social_profiles_parent_id_fk": { + "name": "seo_settings_social_profiles_parent_id_fk", + "tableFrom": "seo_settings_social_profiles", + "tableTo": "seo_settings", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.seo_settings_local_business_opening_hours": { + "name": "seo_settings_local_business_opening_hours", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "specification": { + "name": "specification", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "seo_settings_local_business_opening_hours_order_idx": { + "name": "seo_settings_local_business_opening_hours_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "seo_settings_local_business_opening_hours_parent_id_idx": { + "name": "seo_settings_local_business_opening_hours_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "seo_settings_local_business_opening_hours_parent_id_fk": { + "name": "seo_settings_local_business_opening_hours_parent_id_fk", + "tableFrom": "seo_settings_local_business_opening_hours", + "tableTo": "seo_settings", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.seo_settings": { + "name": "seo_settings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "meta_defaults_default_og_image_id": { + "name": "meta_defaults_default_og_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "organization_name": { + "name": "organization_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "organization_legal_name": { + "name": "organization_legal_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "organization_logo_id": { + "name": "organization_logo_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "organization_founding_date": { + "name": "organization_founding_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "contact_email": { + "name": "contact_email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "contact_phone": { + "name": "contact_phone", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "contact_fax": { + "name": "contact_fax", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "address_street": { + "name": "address_street", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "address_postal_code": { + "name": "address_postal_code", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "address_city": { + "name": "address_city", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "address_region": { + "name": "address_region", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "address_country": { + "name": "address_country", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Deutschland'" + }, + "address_country_code": { + "name": "address_country_code", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'DE'" + }, + "geo_latitude": { + "name": "geo_latitude", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "geo_longitude": { + "name": "geo_longitude", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "local_business_enabled": { + "name": "local_business_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "local_business_type": { + "name": "local_business_type", + "type": "enum_seo_settings_local_business_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "local_business_price_range": { + "name": "local_business_price_range", + "type": "enum_seo_settings_local_business_price_range", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "robots_allow_indexing": { + "name": "robots_allow_indexing", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "verification_google": { + "name": "verification_google", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "verification_bing": { + "name": "verification_bing", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "verification_yandex": { + "name": "verification_yandex", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "seo_settings_meta_defaults_meta_defaults_default_og_imag_idx": { + "name": "seo_settings_meta_defaults_meta_defaults_default_og_imag_idx", + "columns": [ + { + "expression": "meta_defaults_default_og_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "seo_settings_organization_organization_logo_idx": { + "name": "seo_settings_organization_organization_logo_idx", + "columns": [ + { + "expression": "organization_logo_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "seo_settings_meta_defaults_default_og_image_id_media_id_fk": { + "name": "seo_settings_meta_defaults_default_og_image_id_media_id_fk", + "tableFrom": "seo_settings", + "tableTo": "media", + "columnsFrom": [ + "meta_defaults_default_og_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "seo_settings_organization_logo_id_media_id_fk": { + "name": "seo_settings_organization_logo_id_media_id_fk", + "tableFrom": "seo_settings", + "tableTo": "media", + "columnsFrom": [ + "organization_logo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.seo_settings_locales": { + "name": "seo_settings_locales", + "schema": "", + "columns": { + "meta_defaults_title_suffix": { + "name": "meta_defaults_title_suffix", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'| Website'" + }, + "meta_defaults_default_description": { + "name": "meta_defaults_default_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "organization_description": { + "name": "organization_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_locale": { + "name": "_locale", + "type": "_locales", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "seo_settings_locales_locale_parent_id_unique": { + "name": "seo_settings_locales_locale_parent_id_unique", + "columns": [ + { + "expression": "_locale", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "seo_settings_locales_parent_id_fk": { + "name": "seo_settings_locales_parent_id_fk", + "tableFrom": "seo_settings_locales", + "tableTo": "seo_settings", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.seo_settings_texts": { + "name": "seo_settings_texts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "seo_settings_texts_order_parent": { + "name": "seo_settings_texts_order_parent", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "seo_settings_texts_parent_fk": { + "name": "seo_settings_texts_parent_fk", + "tableFrom": "seo_settings_texts", + "tableTo": "seo_settings", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public._locales": { + "name": "_locales", + "schema": "public", + "values": [ + "de", + "en" + ] + }, + "public.enum_pages_blocks_hero_block_alignment": { + "name": "enum_pages_blocks_hero_block_alignment", + "schema": "public", + "values": [ + "left", + "center", + "right" + ] + }, + "public.enum_pages_blocks_hero_block_cta_style": { + "name": "enum_pages_blocks_hero_block_cta_style", + "schema": "public", + "values": [ + "primary", + "secondary", + "outline" + ] + }, + "public.enum_pages_blocks_text_block_width": { + "name": "enum_pages_blocks_text_block_width", + "schema": "public", + "values": [ + "narrow", + "medium", + "full" + ] + }, + "public.enum_pages_blocks_image_text_block_image_position": { + "name": "enum_pages_blocks_image_text_block_image_position", + "schema": "public", + "values": [ + "left", + "right" + ] + }, + "public.enum_pages_blocks_card_grid_block_columns": { + "name": "enum_pages_blocks_card_grid_block_columns", + "schema": "public", + "values": [ + "2", + "3", + "4" + ] + }, + "public.enum_pages_blocks_quote_block_style": { + "name": "enum_pages_blocks_quote_block_style", + "schema": "public", + "values": [ + "simple", + "highlighted", + "with-image" + ] + }, + "public.enum_pages_blocks_cta_block_buttons_style": { + "name": "enum_pages_blocks_cta_block_buttons_style", + "schema": "public", + "values": [ + "primary", + "secondary", + "outline" + ] + }, + "public.enum_pages_blocks_cta_block_background_color": { + "name": "enum_pages_blocks_cta_block_background_color", + "schema": "public", + "values": [ + "dark", + "light", + "accent" + ] + }, + "public.enum_pages_blocks_timeline_block_layout": { + "name": "enum_pages_blocks_timeline_block_layout", + "schema": "public", + "values": [ + "vertical", + "alternating", + "horizontal" + ] + }, + "public.enum_pages_blocks_timeline_block_marker_style": { + "name": "enum_pages_blocks_timeline_block_marker_style", + "schema": "public", + "values": [ + "dot", + "number", + "icon", + "date" + ] + }, + "public.enum_pages_blocks_timeline_block_background_color": { + "name": "enum_pages_blocks_timeline_block_background_color", + "schema": "public", + "values": [ + "white", + "light", + "dark" + ] + }, + "public.enum_pages_blocks_divider_block_style": { + "name": "enum_pages_blocks_divider_block_style", + "schema": "public", + "values": [ + "line", + "space", + "dots" + ] + }, + "public.enum_pages_blocks_divider_block_spacing": { + "name": "enum_pages_blocks_divider_block_spacing", + "schema": "public", + "values": [ + "small", + "medium", + "large" + ] + }, + "public.enum_pages_blocks_video_block_aspect_ratio": { + "name": "enum_pages_blocks_video_block_aspect_ratio", + "schema": "public", + "values": [ + "16:9", + "4:3", + "1:1" + ] + }, + "public.enum_pages_blocks_posts_list_block_post_type": { + "name": "enum_pages_blocks_posts_list_block_post_type", + "schema": "public", + "values": [ + "blog", + "news", + "press", + "announcement", + "all" + ] + }, + "public.enum_pages_blocks_posts_list_block_layout": { + "name": "enum_pages_blocks_posts_list_block_layout", + "schema": "public", + "values": [ + "grid", + "list", + "featured", + "compact", + "masonry" + ] + }, + "public.enum_pages_blocks_posts_list_block_columns": { + "name": "enum_pages_blocks_posts_list_block_columns", + "schema": "public", + "values": [ + "2", + "3", + "4" + ] + }, + "public.enum_pages_blocks_posts_list_block_background_color": { + "name": "enum_pages_blocks_posts_list_block_background_color", + "schema": "public", + "values": [ + "white", + "light", + "dark" + ] + }, + "public.enum_pages_blocks_testimonials_block_layout": { + "name": "enum_pages_blocks_testimonials_block_layout", + "schema": "public", + "values": [ + "slider", + "grid", + "single", + "masonry", + "list" + ] + }, + "public.enum_pages_blocks_testimonials_block_columns": { + "name": "enum_pages_blocks_testimonials_block_columns", + "schema": "public", + "values": [ + "2", + "3", + "4" + ] + }, + "public.enum_pages_blocks_testimonials_block_display_mode": { + "name": "enum_pages_blocks_testimonials_block_display_mode", + "schema": "public", + "values": [ + "all", + "selected" + ] + }, + "public.enum_pages_blocks_testimonials_block_background_color": { + "name": "enum_pages_blocks_testimonials_block_background_color", + "schema": "public", + "values": [ + "white", + "light", + "dark", + "accent" + ] + }, + "public.enum_pages_blocks_newsletter_block_available_interests": { + "name": "enum_pages_blocks_newsletter_block_available_interests", + "schema": "public", + "values": [ + "general", + "blog", + "products", + "offers", + "events" + ] + }, + "public.enum_pages_blocks_newsletter_block_layout": { + "name": "enum_pages_blocks_newsletter_block_layout", + "schema": "public", + "values": [ + "inline", + "stacked", + "with-image", + "minimal", + "card" + ] + }, + "public.enum_pages_blocks_newsletter_block_image_position": { + "name": "enum_pages_blocks_newsletter_block_image_position", + "schema": "public", + "values": [ + "left", + "right" + ] + }, + "public.enum_pages_blocks_newsletter_block_background_color": { + "name": "enum_pages_blocks_newsletter_block_background_color", + "schema": "public", + "values": [ + "white", + "light", + "dark", + "accent" + ] + }, + "public.enum_pages_blocks_process_steps_block_layout": { + "name": "enum_pages_blocks_process_steps_block_layout", + "schema": "public", + "values": [ + "horizontal", + "vertical", + "alternating", + "connected", + "timeline" + ] + }, + "public.enum_pages_blocks_process_steps_block_cta_variant": { + "name": "enum_pages_blocks_process_steps_block_cta_variant", + "schema": "public", + "values": [ + "default", + "ghost", + "light" + ] + }, + "public.enum_pages_blocks_process_steps_block_background_color": { + "name": "enum_pages_blocks_process_steps_block_background_color", + "schema": "public", + "values": [ + "white", + "light", + "dark" + ] + }, + "public.enum_pages_status": { + "name": "enum_pages_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum_posts_type": { + "name": "enum_posts_type", + "schema": "public", + "values": [ + "blog", + "news", + "press", + "announcement" + ] + }, + "public.enum_posts_status": { + "name": "enum_posts_status", + "schema": "public", + "values": [ + "draft", + "published", + "archived" + ] + }, + "public.enum_social_links_platform": { + "name": "enum_social_links_platform", + "schema": "public", + "values": [ + "facebook", + "x", + "instagram", + "youtube", + "linkedin", + "xing" + ] + }, + "public.enum_newsletter_subscribers_interests": { + "name": "enum_newsletter_subscribers_interests", + "schema": "public", + "values": [ + "general", + "blog", + "products", + "offers", + "events" + ] + }, + "public.enum_newsletter_subscribers_status": { + "name": "enum_newsletter_subscribers_status", + "schema": "public", + "values": [ + "pending", + "confirmed", + "unsubscribed", + "bounced" + ] + }, + "public.enum_portfolios_status": { + "name": "enum_portfolios_status", + "schema": "public", + "values": [ + "draft", + "published", + "archived" + ] + }, + "public.enum_cookie_configurations_enabled_categories": { + "name": "enum_cookie_configurations_enabled_categories", + "schema": "public", + "values": [ + "necessary", + "functional", + "analytics", + "marketing" + ] + }, + "public.enum_cookie_configurations_styling_position": { + "name": "enum_cookie_configurations_styling_position", + "schema": "public", + "values": [ + "bottom", + "top", + "middle" + ] + }, + "public.enum_cookie_configurations_styling_theme": { + "name": "enum_cookie_configurations_styling_theme", + "schema": "public", + "values": [ + "dark", + "light", + "auto" + ] + }, + "public.enum_cookie_inventory_category": { + "name": "enum_cookie_inventory_category", + "schema": "public", + "values": [ + "necessary", + "functional", + "analytics", + "marketing" + ] + }, + "public.enum_privacy_policy_settings_provider": { + "name": "enum_privacy_policy_settings_provider", + "schema": "public", + "values": [ + "alfright", + "internal" + ] + }, + "public.enum_privacy_policy_settings_alfright_language": { + "name": "enum_privacy_policy_settings_alfright_language", + "schema": "public", + "values": [ + "de-de", + "de-at", + "de-ch", + "en-gb", + "en-us" + ] + }, + "public.enum_email_logs_status": { + "name": "enum_email_logs_status", + "schema": "public", + "values": [ + "pending", + "sent", + "failed" + ] + }, + "public.enum_email_logs_source": { + "name": "enum_email_logs_source", + "schema": "public", + "values": [ + "manual", + "form", + "system", + "newsletter" + ] + }, + "public.enum_audit_logs_action": { + "name": "enum_audit_logs_action", + "schema": "public", + "values": [ + "login_success", + "login_failed", + "logout", + "password_changed", + "password_reset", + "create", + "update", + "delete", + "config_changed", + "email_failed", + "access_denied", + "rate_limit" + ] + }, + "public.enum_audit_logs_severity": { + "name": "enum_audit_logs_severity", + "schema": "public", + "values": [ + "info", + "warning", + "error", + "critical" + ] + }, + "public.enum_audit_logs_entity_type": { + "name": "enum_audit_logs_entity_type", + "schema": "public", + "values": [ + "users", + "tenants", + "pages", + "posts", + "media", + "forms", + "email", + "global", + "system" + ] + }, + "public.enum_forms_confirmation_type": { + "name": "enum_forms_confirmation_type", + "schema": "public", + "values": [ + "message", + "redirect" + ] + }, + "public.enum_forms_redirect_type": { + "name": "enum_forms_redirect_type", + "schema": "public", + "values": [ + "reference", + "custom" + ] + }, + "public.enum_redirects_to_type": { + "name": "enum_redirects_to_type", + "schema": "public", + "values": [ + "reference", + "custom" + ] + }, + "public.enum_navigation_main_menu_submenu_link_type": { + "name": "enum_navigation_main_menu_submenu_link_type", + "schema": "public", + "values": [ + "page", + "custom" + ] + }, + "public.enum_navigation_main_menu_type": { + "name": "enum_navigation_main_menu_type", + "schema": "public", + "values": [ + "page", + "custom", + "submenu" + ] + }, + "public.enum_navigation_footer_menu_link_type": { + "name": "enum_navigation_footer_menu_link_type", + "schema": "public", + "values": [ + "page", + "custom" + ] + }, + "public.enum_seo_settings_social_profiles_platform": { + "name": "enum_seo_settings_social_profiles_platform", + "schema": "public", + "values": [ + "facebook", + "instagram", + "twitter", + "linkedin", + "youtube", + "tiktok", + "pinterest", + "xing", + "other" + ] + }, + "public.enum_seo_settings_local_business_type": { + "name": "enum_seo_settings_local_business_type", + "schema": "public", + "values": [ + "LocalBusiness", + "Physician", + "Dentist", + "Attorney", + "Restaurant", + "Hotel", + "Store", + "HealthClub", + "HairSalon", + "AutoRepair", + "RealEstateAgent", + "FinancialService", + "ProfessionalService", + "MedicalBusiness" + ] + }, + "public.enum_seo_settings_local_business_price_range": { + "name": "enum_seo_settings_local_business_price_range", + "schema": "public", + "values": [ + "€", + "€€", + "€€€", + "€€€€" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "id": "eaf6c827-4c24-4212-8d5d-ef3a3e7c5790", + "prevId": "00000000-0000-0000-0000-000000000000" +} \ No newline at end of file diff --git a/src/migrations/20251207_205727_audit_logs_collection.ts b/src/migrations/20251207_205727_audit_logs_collection.ts new file mode 100644 index 0000000..a2f716a --- /dev/null +++ b/src/migrations/20251207_205727_audit_logs_collection.ts @@ -0,0 +1,49 @@ +import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres' + +export async function up({ db, payload, req }: MigrateUpArgs): Promise { + await db.execute(sql` + CREATE TYPE "public"."enum_audit_logs_action" AS ENUM('login_success', 'login_failed', 'logout', 'password_changed', 'password_reset', 'create', 'update', 'delete', 'config_changed', 'email_failed', 'access_denied', 'rate_limit'); + CREATE TYPE "public"."enum_audit_logs_severity" AS ENUM('info', 'warning', 'error', 'critical'); + CREATE TYPE "public"."enum_audit_logs_entity_type" AS ENUM('users', 'tenants', 'pages', 'posts', 'media', 'forms', 'email', 'global', 'system'); + CREATE TABLE "audit_logs" ( + "id" serial PRIMARY KEY NOT NULL, + "action" "enum_audit_logs_action" NOT NULL, + "severity" "enum_audit_logs_severity" DEFAULT 'info' NOT NULL, + "entity_type" "enum_audit_logs_entity_type", + "entity_id" varchar, + "user_id" integer, + "user_email" varchar, + "tenant_id" integer, + "ip_address" varchar, + "user_agent" varchar, + "description" varchar, + "previous_value" jsonb, + "new_value" jsonb, + "metadata" jsonb, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + ALTER TABLE "payload_locked_documents_rels" ADD COLUMN "audit_logs_id" integer; + ALTER TABLE "audit_logs" ADD CONSTRAINT "audit_logs_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "audit_logs" ADD CONSTRAINT "audit_logs_tenant_id_tenants_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "public"."tenants"("id") ON DELETE set null ON UPDATE no action; + CREATE INDEX "audit_logs_user_idx" ON "audit_logs" USING btree ("user_id"); + CREATE INDEX "audit_logs_tenant_idx" ON "audit_logs" USING btree ("tenant_id"); + CREATE INDEX "audit_logs_updated_at_idx" ON "audit_logs" USING btree ("updated_at"); + CREATE INDEX "audit_logs_created_at_idx" ON "audit_logs" USING btree ("created_at"); + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_audit_logs_fk" FOREIGN KEY ("audit_logs_id") REFERENCES "public"."audit_logs"("id") ON DELETE cascade ON UPDATE no action; + CREATE INDEX "payload_locked_documents_rels_audit_logs_id_idx" ON "payload_locked_documents_rels" USING btree ("audit_logs_id");`) +} + +export async function down({ db, payload, req }: MigrateDownArgs): Promise { + await db.execute(sql` + ALTER TABLE "audit_logs" DISABLE ROW LEVEL SECURITY; + DROP TABLE "audit_logs" CASCADE; + ALTER TABLE "payload_locked_documents_rels" DROP CONSTRAINT "payload_locked_documents_rels_audit_logs_fk"; + + DROP INDEX "payload_locked_documents_rels_audit_logs_id_idx"; + ALTER TABLE "payload_locked_documents_rels" DROP COLUMN "audit_logs_id"; + DROP TYPE "public"."enum_audit_logs_action"; + DROP TYPE "public"."enum_audit_logs_severity"; + DROP TYPE "public"."enum_audit_logs_entity_type";`) +} diff --git a/src/migrations/index.ts b/src/migrations/index.ts index 2be1372..9b37f56 100644 --- a/src/migrations/index.ts +++ b/src/migrations/index.ts @@ -3,6 +3,7 @@ import * as migration_20251202_081830_add_is_super_admin_to_users from './202512 import * as migration_20251206_071552_portfolio_collections from './20251206_071552_portfolio_collections'; import * as migration_20251206_134750_tenant_email_config from './20251206_134750_tenant_email_config'; import * as migration_20251206_141403_email_logs_collection from './20251206_141403_email_logs_collection'; +import * as migration_20251207_205727_audit_logs_collection from './20251207_205727_audit_logs_collection'; export const migrations = [ { @@ -28,6 +29,11 @@ export const migrations = [ { up: migration_20251206_141403_email_logs_collection.up, down: migration_20251206_141403_email_logs_collection.down, - name: '20251206_141403_email_logs_collection' + name: '20251206_141403_email_logs_collection', + }, + { + up: migration_20251207_205727_audit_logs_collection.up, + down: migration_20251207_205727_audit_logs_collection.down, + name: '20251207_205727_audit_logs_collection' }, ]; diff --git a/src/payload-types.ts b/src/payload-types.ts index ddea787..0bee492 100644 --- a/src/payload-types.ts +++ b/src/payload-types.ts @@ -83,6 +83,7 @@ export interface Config { 'consent-logs': ConsentLog; 'privacy-policy-settings': PrivacyPolicySetting; 'email-logs': EmailLog; + 'audit-logs': AuditLog; forms: Form; 'form-submissions': FormSubmission; redirects: Redirect; @@ -109,6 +110,7 @@ export interface Config { 'consent-logs': ConsentLogsSelect | ConsentLogsSelect; 'privacy-policy-settings': PrivacyPolicySettingsSelect | PrivacyPolicySettingsSelect; 'email-logs': EmailLogsSelect | EmailLogsSelect; + 'audit-logs': AuditLogsSelect | AuditLogsSelect; forms: FormsSelect | FormsSelect; 'form-submissions': FormSubmissionsSelect | FormSubmissionsSelect; redirects: RedirectsSelect | RedirectsSelect; @@ -1225,6 +1227,90 @@ export interface EmailLog { updatedAt: string; createdAt: string; } +/** + * Protokoll wichtiger System-Aktionen + * + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "audit-logs". + */ +export interface AuditLog { + id: number; + action: + | 'login_success' + | 'login_failed' + | 'logout' + | 'password_changed' + | 'password_reset' + | 'create' + | 'update' + | 'delete' + | 'config_changed' + | 'email_failed' + | 'access_denied' + | 'rate_limit'; + severity: 'info' | 'warning' | 'error' | 'critical'; + entityType?: ('users' | 'tenants' | 'pages' | 'posts' | 'media' | 'forms' | 'email' | 'global' | 'system') | null; + /** + * ID des betroffenen Dokuments + */ + entityId?: string | null; + /** + * Benutzer, der die Aktion ausgeführt hat + */ + user?: (number | null) | User; + /** + * E-Mail zum Zeitpunkt der Aktion (für gelöschte User) + */ + userEmail?: string | null; + /** + * Betroffener Tenant (falls zutreffend) + */ + tenant?: (number | null) | Tenant; + ipAddress?: string | null; + userAgent?: string | null; + /** + * Detaillierte Beschreibung der Aktion + */ + description?: string | null; + /** + * Zustand vor der Änderung + */ + previousValue?: + | { + [k: string]: unknown; + } + | unknown[] + | string + | number + | boolean + | null; + /** + * Zustand nach der Änderung + */ + newValue?: + | { + [k: string]: unknown; + } + | unknown[] + | string + | number + | boolean + | null; + /** + * Weitere Kontextinformationen + */ + metadata?: + | { + [k: string]: unknown; + } + | unknown[] + | string + | number + | boolean + | null; + updatedAt: string; + createdAt: string; +} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "forms". @@ -1509,6 +1595,10 @@ export interface PayloadLockedDocument { relationTo: 'email-logs'; value: number | EmailLog; } | null) + | ({ + relationTo: 'audit-logs'; + value: number | AuditLog; + } | null) | ({ relationTo: 'forms'; value: number | Form; @@ -2321,6 +2411,27 @@ export interface EmailLogsSelect { updatedAt?: T; createdAt?: T; } +/** + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` "audit-logs_select". + */ +export interface AuditLogsSelect { + action?: T; + severity?: T; + entityType?: T; + entityId?: T; + user?: T; + userEmail?: T; + tenant?: T; + ipAddress?: T; + userAgent?: T; + description?: T; + previousValue?: T; + newValue?: T; + metadata?: T; + updatedAt?: T; + createdAt?: T; +} /** * This interface was referenced by `Config`'s JSON-Schema * via the `definition` "forms_select". diff --git a/src/payload.config.ts b/src/payload.config.ts index edbeddb..e00ed30 100644 --- a/src/payload.config.ts +++ b/src/payload.config.ts @@ -48,6 +48,9 @@ import { multiTenantEmailAdapter } from './lib/email/payload-email-adapter' // Email Logs import { EmailLogs } from './collections/EmailLogs' +// Audit Logs +import { AuditLogs } from './collections/AuditLogs' + const filename = fileURLToPath(import.meta.url) const dirname = path.dirname(filename) @@ -118,6 +121,7 @@ export default buildConfig({ PrivacyPolicySettings, // System EmailLogs, + AuditLogs, ], globals: [SiteSettings, Navigation, SEOSettings], editor: lexicalEditor(),