diff --git a/.agents/skills/drizzle-database/SKILL.md b/.agents/skills/drizzle-database/SKILL.md index 751612ac35..8a6d5aa14c 100644 --- a/.agents/skills/drizzle-database/SKILL.md +++ b/.agents/skills/drizzle-database/SKILL.md @@ -55,6 +55,8 @@ export const myModel = pgTable( - `bigintAsString()` custom type: stores `bigint` in DB, exposes as `string` in app - FK pattern: `.references(() => otherModel.id, { onDelete, onUpdate })` - Index naming: `TableName_columnName_idx` or `TableName_column_key` for unique +- Every FK column must lead an index so RI cascade lookups do not scan child tables. `pnpm --filter @chatbotx.io/database test` runs `workspace-purge-coverage.test.ts`, which rejects any newly unindexed FK. +- A new table with `workspaceId` requires the `workspace-purge` skill. Partitioned-table indexes use the per-partition recipe in `20260924105732_add_contact_inbox_fk_indexes`. ### Enums @@ -217,8 +219,9 @@ const item = await findOrFail({ table: myModel, where: { id } }) `Workspace.scheduledDeletionAt` is the repository's soft-delete convention: use a nullable timestamp with an index. Scheduling sets it to `now + 24h`, cancellation clears it, and the workspace row remains live during the grace -window. The hourly purge cron then hard-deletes due rows, allowing the normal -foreign-key cascade to remove children. `UserQuota.channelsTornDownAt` is the +window. The hourly purge cron drains large children in bounded batches before +hard-deleting the workspace; read `workspace-purge` before adding a +workspace-scoped table or teardown step. `UserQuota.channelsTornDownAt` is the sibling marker for one-shot trial-expiry channel teardown; it is not a second soft-delete state. diff --git a/.agents/skills/reliability-concurrency/SKILL.md b/.agents/skills/reliability-concurrency/SKILL.md index 1814acbce0..95f23bb1b8 100644 --- a/.agents/skills/reliability-concurrency/SKILL.md +++ b/.agents/skills/reliability-concurrency/SKILL.md @@ -37,6 +37,12 @@ Delete-then-insert (e.g. embedding `replaceForSource`) must be: - Multiple agents editing the same working tree corrupt each other's git index. For parallel work use separate git worktrees. - Stage specific files only — never `git add -A`/`.` (`.agents/rules/git.md`). +## 6. Bulk deletes and updates + +- Bound every statement with a `LIMIT` and keyset or `FOR UPDATE SKIP LOCKED`. +- Commit each batch before starting the next; never build `IN` from every matching id. +- Set `lock_timeout` and `statement_timeout`, and keep the total run below its distributed-lock TTL. + ## Stop condition diff --git a/.agents/skills/worker-development/SKILL.md b/.agents/skills/worker-development/SKILL.md index 822a468cc2..71e4f307a8 100644 --- a/.agents/skills/worker-development/SKILL.md +++ b/.agents/skills/worker-development/SKILL.md @@ -215,6 +215,8 @@ quota, and tenancy lifecycle jobs are excluded from this gate. ### Adding a schedule handler Use this four-edit flow, shown by the `purgeWorkspaces` handler: +When changing `purgeWorkspaces`, also read `workspace-purge` so the schedule remains bounded below its lock TTL. + 1. Add the `ScheduleJobData` key, payload type, and union member in `packages/worker-config/src/queues/schedule/index.ts`. diff --git a/.agents/skills/workspace-purge/SKILL.md b/.agents/skills/workspace-purge/SKILL.md new file mode 100644 index 0000000000..33dbc9eb00 --- /dev/null +++ b/.agents/skills/workspace-purge/SKILL.md @@ -0,0 +1,37 @@ +--- +name: workspace-purge +description: Keep workspace deletion bounded, indexed, resumable, and safe under lock contention. +--- + +# Workspace Purge Safety + +Use this skill for a new table, foreign key, workspace-scoped data, hypertable, or any change to workspace deletion, purge, or runtime freeze. + +## Lifecycle + +`scheduleDeletion` (reversible grace period) → worker `purgeWorkspaces` → +`workspaceService.teardownDueWorkspace`: + +1. acquire the workspace purge lease; +2. freeze runtime work and disconnect integrations/channels only after deletion is due; +3. drain workspace analytics, heavy tables, partitioned rows, and `ContactInboxPost`; +4. delete `Workspace` with bounded timeouts, then release quota; +5. reconcile the owner's correct quota scope. + +The scheduled worker may retry this path. Every step must be idempotent and leave incomplete work for the next tick through `WorkspacePurgeIncompleteError`. + +## Required rules + +1. **Every new foreign-key column needs a leading index.** A parent delete invokes a child RI lookup for every deleted parent row. Nullable `SET NULL` foreign keys use a partial `WHERE column IS NOT NULL` index. The CI-enforced `packages/database/__tests__/workspace-purge-coverage.test.ts` rejects a newly unindexed FK; `purge-fk-indexes.test.ts` verifies migration shape for high-volume paths. +2. **Drain large workspace tables before the final cascade.** A log, event, stat, per-contact, or per-message table with `workspaceId` belongs in `repositories/workspace-purge/tables.ts`, in child-before-parent order, and needs a leading `workspaceId` index. Partitioned tables delete by their primary-key tuple with a per-table workspace selector; never use `ctid`. Hypertables delete bounded workspace time slices with `liftDecompressionLimit`, shrinking the slice after a timeout. +3. **Delete workspace-scoped tables without a foreign key explicitly.** A missing FK does not make data disappear at workspace deletion. Add the table and owning strategy to `NO_FK_WORKSPACE_TABLES`; the coverage test fails if a table with `workspaceId` is neither cascade-reachable nor registered. +4. **Keep every purge/freeze statement bounded.** Use a `LIMIT` plus keyset or `FOR UPDATE SKIP LOCKED`, one short transaction per batch, and no `IN` built from every matching id. Never call HTTP while holding a database transaction. Use `withPurgeTimeouts`; stop before the cron deadline so its run stays below the distributed-lock TTL. +5. **Make teardown idempotent.** It runs again on each tick. Convert temporary lock/timeout failures into `WorkspacePurgeIncompleteError` so the next tick resumes safely. +6. **Reconcile the correct quota scope.** Call `userQuotaService.reconcileOwnerAfterTeardown(ownerId)`; never count all root-tenant resources as a reseller pool. +7. **Retain billing ledgers.** Owner-keyed billing consumption rollups such as `WorkspaceMac` are evidence of period usage and must be registered as `retainedBilling`, never deleted with their workspace. + +## Before merge +- Run `pnpm --filter @chatbotx.io/database test` and inspect the purge FK index tests. +- Inspect generated migration SQL. Partitioned indexes must use per-partition `CREATE INDEX CONCURRENTLY`, `ON ONLY` parent indexes, `ATTACH PARTITION`, and validity checks. +- Run `EXPLAIN (ANALYZE, BUFFERS)` in `BEGIN … ROLLBACK` for representative purge batches. RI triggers must use index scans. +- Verify a purge alongside activity in another workspace: no long-lived lock waits and no purge transaction longer than a batch. diff --git a/.claude/agents/invariant-guard.md b/.claude/agents/invariant-guard.md index 965f55e5be..dc73ab462e 100644 --- a/.claude/agents/invariant-guard.md +++ b/.claude/agents/invariant-guard.md @@ -1,6 +1,6 @@ --- name: invariant-guard -description: Use PROACTIVELY after any edit under apps/, packages/, or integrations/ to check a diff against the non-obvious ChatbotX invariants that no lint rule enforces (triple-d middleware names, relations/index.ts double-edit, ChannelType cascade, bindArgsSchemas binding, no-input execute(), i18n-mandatory, Drizzle-not-Prisma, no direct db in app layer, no dynamic import, new-package CI install, flow node type cascade, TanStack Query mutation invalidation, agent-first public API parity). Reports violations only; does not edit. +description: Use PROACTIVELY after any edit under apps/, packages/, or integrations/ to check the non-obvious ChatbotX invariants, including workspace purge safety. Reports violations only; does not edit. tools: Read, Grep, Glob, Bash model: sonnet --- @@ -30,6 +30,7 @@ You are a focused reviewer with ONE job: catch violations of the ChatbotX invari 11. **Flow node type cascade.** If `nodeTypeSchema` in `packages/flow-config/src/nodes/base.ts` gained a value, grep an existing node schema symbol (e.g. `waitNodeSchema`) and `nodeTypeSchema.enum.` across `apps/` and `packages/` — the new node must appear in the `flowVersionSchema` union (`packages/flow-config/src/nodes/index.ts`), `allNodesConfig` (`nodes/node-config.tsx`), `allSteps` (`steps/index.tsx`), `viewerNodeTypes` (`react-flow-wrapper.tsx`), and `analyticsNodeTypes` (`node-types-config.ts`). These are plain-object maps and hand-rolled unions that fail SILENTLY (node doesn't render, or publish fails with a generic toast). Also flag any NEW zod union that hand-lists node schemas instead of reusing `flowVersionSchema`/`publishFlowSchema`. 12. **TanStack Query mutation invalidation.** If a mutation creates, updates, deletes, toggles, or moves a resource read through a TanStack Query hook, flag a missing resource invalidator (or `setQueryData`) in its success path; `router.refresh()` alone does not update the browser cache. Also flag a new `ChangeFolderDialog` caller that omits `onSuccess`, because the dialog cannot know which resource key to invalidate. 13. **Agent-first public API parity** (AGENTS.md invariant 23). If the diff adds a server action under `apps/builder/src/features/*/actions/`, a procedure in a feature's `api/private.ts`/`api/index.ts`, or a new feature folder, check that the same feature's `api/public.ts` (or `api/public/*.ts`) gains — or already has — a procedure for the same operation, and that it is nested in `apps/builder/src/routers/public.ts`. Pay extra attention to result-returning operations: an action or procedure whose name matches `preview|test|simulat|generate|export|run|sync|scan|stats|link|render` is the kind most often shipped UI-only. Also flag a public procedure that re-implements logic instead of calling the same service/`lib/` function as the UI path. Skip features on the invariant 23 exempt list (auth/account, platform admin, end-customer webviews, OAuth redirect step, UI-only plumbing, token minting) but say which exemption you applied. Severity: HIGH (the operation is invisible to the CLI/MCP). +14. **Workspace purge safety.** If the diff adds or changes a schema FK, a workspace-scoped table, `workspace-lifecycle`, workspace purge code, campaign cleanup, or dispatch cancellation, require the `workspace-purge` rules: leading FK indexes; child-before-parent bounded drains; PK-tuple deletes for partitioned data; chunk drains for hypertables; short timeout-guarded transactions. Require `packages/database/__tests__/workspace-purge-coverage.test.ts` for a new workspace-scoped table or FK. ## Output @@ -38,5 +39,5 @@ A single findings table, severity-tagged (HIGH = silent runtime/clone breakage; ## Boundaries - Read-only. Never edit files. Report only. -- Do not review general code quality, style, or logic — that is other reviewers' job. Stay on these 13 invariants. +- Do not review general code quality, style, or logic — that is other reviewers' job. Stay on these 14 invariants. - If a diff touches none of the invariant surfaces, return `INVARIANTS: PASS (no invariant-relevant changes)` and stop. diff --git a/.devin/rules/chatbotx.md b/.devin/rules/chatbotx.md index a050787cd4..6b4eeac354 100644 --- a/.devin/rules/chatbotx.md +++ b/.devin/rules/chatbotx.md @@ -59,6 +59,8 @@ pnpm workspaces + Turborepo · TypeScript 5 · React 19 · Next.js 16 (builder) 22. **`ContactInboxPost` has no FK and is partitioned by `workspaceId`.** Every ContactInbox, Contact, or Workspace delete path must go through `contactInboxPostService`; every post query must include `workspaceId`; and post writes must hold the durable workspace purge guard through commit. 23. **Agent-first: every feature ships a public API — including the ones that only return a result.** The CLI and MCP server derive their whole surface from `GET /api/public-spec.json` (`publicRouter`), so a capability without a public procedure does not exist for an AI agent, however well it works in the UI. A new feature — or a new operation on an existing one — must add a procedure to its `features//api/public.ts`, nested in `apps/builder/src/routers/public.ts`, behind `workspaceTokenAuthAPIForScope("")`. This covers **result-returning operations**, not just CRUD: anything a user clicks in the UI to *get something back* — a link (`botSimulator.getLink` is the reference), a preview or render, a test run/test send/connection test, stats and reports, an export, AI-generated content, a status check, a sync or scan. The rule of thumb: if a button in the UI produces a result, an agent must be able to call one operation and receive the same result. Build the public procedure **first** and the UI second; both call the same service method or `features//lib/` function, never two implementations. The response must be machine-usable data (ids, URLs, JSON) — never something that only renders on screen — and the procedure's `summary`/`description` must say which operation supplies each input id (e.g. "Get webchat ids from `webchats.list`"). Then run the `cli-mcp-docs` skill. **Exempt** (state the reason in the PR): sign-in/sign-up and personal account settings; platform administration (super admin, reseller, tenant, platform credentials); end-customer public pages (webviews, short links, booking pages); the browser-redirect step of a channel OAuth connect (the post-connect read/settings/disconnect still need an API); UI-only plumbing (device push tokens, realtime, help items); and operations a workspace token must never perform (minting/revoking API tokens). + +24. **Workspace purge must stay bounded.** Every new FK must have a leading index; high-volume workspace purge paths need explicit audit coverage. `packages/database/__tests__/workspace-purge-coverage.test.ts` rejects a workspace-scoped table without a cascade path or registered purge strategy, and new unindexed FKs. Large workspace tables drain child-before-parent in bounded batches; partitioned tables delete by PK tuples and hypertables by workspace chunks; freeze/purge work uses short timeout-guarded transactions. Billing consumption ledgers (`WorkspaceMac`) are owner-keyed and are never purged with the workspace. Read `.agents/skills/workspace-purge/SKILL.md`. ## Workflow diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index d9a3465731..e8442981b9 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -63,6 +63,8 @@ These instructions apply repository-wide. Read the relevant detailed rule in `.a 22. **`ContactInboxPost` has no FK and is partitioned by `workspaceId`.** Every ContactInbox, Contact, or Workspace delete path must go through `contactInboxPostService`; every post query must include `workspaceId`; and post writes must hold the durable workspace purge guard through commit. 23. **Agent-first: every feature ships a public API — including the ones that only return a result.** The CLI and MCP server derive their whole surface from `GET /api/public-spec.json` (`publicRouter`), so a capability without a public procedure does not exist for an AI agent, however well it works in the UI. A new feature — or a new operation on an existing one — must add a procedure to its `features//api/public.ts`, nested in `apps/builder/src/routers/public.ts`, behind `workspaceTokenAuthAPIForScope("")`. This covers **result-returning operations**, not just CRUD: anything a user clicks in the UI to *get something back* — a link (`botSimulator.getLink` is the reference), a preview or render, a test run/test send/connection test, stats and reports, an export, AI-generated content, a status check, a sync or scan. The rule of thumb: if a button in the UI produces a result, an agent must be able to call one operation and receive the same result. Build the public procedure **first** and the UI second; both call the same service method or `features//lib/` function, never two implementations. The response must be machine-usable data (ids, URLs, JSON) — never something that only renders on screen — and the procedure's `summary`/`description` must say which operation supplies each input id (e.g. "Get webchat ids from `webchats.list`"). Then run the `cli-mcp-docs` skill. **Exempt** (state the reason in the PR): sign-in/sign-up and personal account settings; platform administration (super admin, reseller, tenant, platform credentials); end-customer public pages (webviews, short links, booking pages); the browser-redirect step of a channel OAuth connect (the post-connect read/settings/disconnect still need an API); UI-only plumbing (device push tokens, realtime, help items); and operations a workspace token must never perform (minting/revoking API tokens). + +24. **Workspace purge must stay bounded.** Every new FK must have a leading index; high-volume workspace purge paths need explicit audit coverage. `packages/database/__tests__/workspace-purge-coverage.test.ts` rejects a workspace-scoped table without a cascade path or registered purge strategy, and new unindexed FKs. Large workspace tables drain child-before-parent in bounded batches; partitioned tables delete by PK tuples and hypertables by workspace chunks; freeze/purge work uses short timeout-guarded transactions. Billing consumption ledgers (`WorkspaceMac`) are owner-keyed and are never purged with the workspace. Read `.agents/skills/workspace-purge/SKILL.md`. ## Rule index diff --git a/AGENTS.md b/AGENTS.md index 8452d2bd2e..e1da47ce30 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -197,6 +197,8 @@ These are the most common mistakes — read before writing any code: 23. **Agent-first: every feature ships a public API — including the ones that only return a result.** The CLI and MCP server derive their whole surface from `GET /api/public-spec.json` (`publicRouter`), so a capability without a public procedure does not exist for an AI agent, however well it works in the UI. A new feature — or a new operation on an existing one — must add a procedure to its `features//api/public.ts`, nested in `apps/builder/src/routers/public.ts`, behind `workspaceTokenAuthAPIForScope("")`. This covers **result-returning operations**, not just CRUD: anything a user clicks in the UI to *get something back* — a link (`botSimulator.getLink` is the reference), a preview or render, a test run/test send/connection test, stats and reports, an export, AI-generated content, a status check, a sync or scan. The rule of thumb: if a button in the UI produces a result, an agent must be able to call one operation and receive the same result. Build the public procedure **first** and the UI second; both call the same service method or `features//lib/` function, never two implementations. The response must be machine-usable data (ids, URLs, JSON) — never something that only renders on screen — and the procedure's `summary`/`description` must say which operation supplies each input id (e.g. "Get webchat ids from `webchats.list`"). Then run the `cli-mcp-docs` skill. **Exempt** (state the reason in the PR): sign-in/sign-up and personal account settings; platform administration (super admin, reseller, tenant, platform credentials); end-customer public pages (webviews, short links, booking pages); the browser-redirect step of a channel OAuth connect (the post-connect read/settings/disconnect still need an API); UI-only plumbing (device push tokens, realtime, help items); and operations a workspace token must never perform (minting/revoking API tokens). +24. **Workspace purge must stay bounded.** Every new FK must have a leading index; high-volume workspace purge paths need explicit audit coverage. `packages/database/__tests__/workspace-purge-coverage.test.ts` rejects a workspace-scoped table without a cascade path or registered purge strategy, and new unindexed FKs. Large workspace tables drain child-before-parent in bounded batches; partitioned tables delete by PK tuples and hypertables by workspace chunks; freeze/purge work uses short timeout-guarded transactions. Billing consumption ledgers (`WorkspaceMac`) are owner-keyed and are never purged with the workspace. Read `.agents/skills/workspace-purge/SKILL.md`. + ## Git conventions diff --git a/CLAUDE.md b/CLAUDE.md index 612502e97e..37680143f4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -22,6 +22,7 @@ | After any public API change (every one surfaces in the CLI/MCP), or CLI/MCP docs/skill drift | `cli-mcp-docs` | | Business logic, new service method, any DB read/write from app code | `business-data-access` | | New DB table or migration | `drizzle-database` | +| New table / FK / workspace-scoped data, or any change to workspace deletion/purge/freeze | `workspace-purge` | | New background job or queue | `worker-development` | | New channel integration | `integration-channel` | | Contact filter field/operator, filter SQL, or contact-based audience | `contact-filter` | diff --git a/apps/builder/AGENTS.md b/apps/builder/AGENTS.md new file mode 100644 index 0000000000..643577dfae --- /dev/null +++ b/apps/builder/AGENTS.md @@ -0,0 +1,9 @@ + + +# This is NOT the Next.js you know + +This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices. + +This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean. + + diff --git a/apps/builder/__tests__/api-parity-manifest.json b/apps/builder/__tests__/api-parity-manifest.json index 21455c1b71..505aaa17f8 100644 --- a/apps/builder/__tests__/api-parity-manifest.json +++ b/apps/builder/__tests__/api-parity-manifest.json @@ -463,11 +463,11 @@ "workspace-members/delete-workspace-member.action:deleteWorkspaceMemberAction": "covered:workspace-members", "workspace-members/invite-workspace-member.action:inviteWorkspaceMemberAction": "covered:workspace-members", "workspace-members/update-workspace-member.action:updateWorkspaceMemberAction": "covered:workspace-members", - "workspaces/cancel-workspace-deletion-action:cancelWorkspaceDeletionAction": "covered:workspaces", + "workspaces/cancel-workspace-deletion-action:cancelWorkspaceDeletionAction": "private:destructive account-auth operation; workspace tokens cannot schedule or cancel deletion", "workspaces/create-workspace-token-action:createWorkspaceTokenAction": "covered:workspaces", "workspaces/delete-workspace-token-action:deleteWorkspaceTokenAction": "covered:workspaces", "workspaces/refresh-all-channel-tokens.action:refreshAllChannelTokensAction": "covered:workspaces", - "workspaces/schedule-workspace-deletion-action:scheduleWorkspaceDeletionAction": "covered:workspaces", + "workspaces/schedule-workspace-deletion-action:scheduleWorkspaceDeletionAction": "private:destructive account-auth operation; workspace tokens cannot schedule or cancel deletion", "workspaces/toggle-support-access.action:toggleSupportAccessAction": "covered:workspaces", "workspaces/update-workspace-action:updateWorkspaceBasicAction": "covered:workspaces", "workspaces/update-workspace-action:updateWorkspaceAdvancedAction": "covered:workspaces", diff --git a/apps/builder/__tests__/list-my-workspaces-api.test.ts b/apps/builder/__tests__/list-my-workspaces-api.test.ts index 53d2dd522e..e234b6331a 100644 --- a/apps/builder/__tests__/list-my-workspaces-api.test.ts +++ b/apps/builder/__tests__/list-my-workspaces-api.test.ts @@ -64,6 +64,8 @@ vi.mock("@chatbotx.io/database/schema", () => ({ name: z.string(), token: z.string().nullable(), }), + workspaceDeletionRecordDetailsSchema: z.object({}), + workspaceDeletionRecordUsageSnapshotSchema: z.object({}), workspaceModel: {}, })) diff --git a/apps/builder/__tests__/schedule-workspace-deletion-action.test.ts b/apps/builder/__tests__/schedule-workspace-deletion-action.test.ts index 75400a5aef..f51d6ada9c 100644 --- a/apps/builder/__tests__/schedule-workspace-deletion-action.test.ts +++ b/apps/builder/__tests__/schedule-workspace-deletion-action.test.ts @@ -5,7 +5,6 @@ import { beforeEach, expect, test, vi } from "vitest" const mockGetCurrentUserAndTargetWorkspace = vi.fn() const mockHasWorkspacePermission = vi.fn() const mockScheduleDeletion = vi.fn() -const mockFreezeWorkspaceRuntime = vi.fn() vi.mock("@/lib/safe-action", () => { const chain: Record = {} @@ -25,14 +24,15 @@ vi.mock("@/lib/auth/permission-routes", () => ({ })) vi.mock("@chatbotx.io/business", () => ({ - workspaceLifecycleService: { - freezeWorkspaceRuntime: mockFreezeWorkspaceRuntime, - }, workspaceService: { scheduleDeletion: mockScheduleDeletion, }, })) +vi.mock("next-intl/server", () => ({ + getTranslations: vi.fn(async () => (key: string) => key), +})) + const { scheduleWorkspaceDeletionAction } = await import( "../src/features/workspaces/actions/schedule-workspace-deletion-action" ) @@ -43,19 +43,21 @@ beforeEach(() => { targetWorkspaceMember: { permissions: { superAdmin: true }, }, + user: { id: "user-1" }, }) mockHasWorkspacePermission.mockReturnValue(true) mockScheduleDeletion.mockResolvedValue(undefined) - mockFreezeWorkspaceRuntime.mockResolvedValue(undefined) }) -test("schedules deletion then freezes the workspace runtime", async () => { +test("schedules a reversible workspace deletion grace period", async () => { await ( scheduleWorkspaceDeletionAction as (props: unknown) => Promise )({ bindArgsParsedInputs: ["workspace-1"], }) - expect(mockScheduleDeletion).toHaveBeenCalledWith({ id: "workspace-1" }) - expect(mockFreezeWorkspaceRuntime).toHaveBeenCalledWith("workspace-1") + expect(mockScheduleDeletion).toHaveBeenCalledWith({ + actorId: "user-1", + id: "workspace-1", + }) }) diff --git a/apps/builder/messages/ar.json b/apps/builder/messages/ar.json index 575ab266d9..9e564c049d 100644 --- a/apps/builder/messages/ar.json +++ b/apps/builder/messages/ar.json @@ -5869,6 +5869,23 @@ "searchPlaceholder": "ابحث بالاسم أو بريد المالك الإلكتروني أو المعرف", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/az.json b/apps/builder/messages/az.json index 679eddbb01..69e81f5481 100644 --- a/apps/builder/messages/az.json +++ b/apps/builder/messages/az.json @@ -7127,6 +7127,23 @@ "searchPlaceholder": "Ada, sahibin e-poçtuna və ya ID-yə görə axtarış", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/da.json b/apps/builder/messages/da.json index 89d243a405..dcfdde10da 100644 --- a/apps/builder/messages/da.json +++ b/apps/builder/messages/da.json @@ -6258,6 +6258,23 @@ "searchPlaceholder": "Søg efter navn, ejerens e-mail eller id", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/de.json b/apps/builder/messages/de.json index 11a2aa81b4..6fe1861a25 100644 --- a/apps/builder/messages/de.json +++ b/apps/builder/messages/de.json @@ -6258,6 +6258,23 @@ "searchPlaceholder": "Suche nach Name, Besitzer-E-Mail oder ID", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/en.json b/apps/builder/messages/en.json index b53089b140..5cb71a964d 100644 --- a/apps/builder/messages/en.json +++ b/apps/builder/messages/en.json @@ -7127,6 +7127,23 @@ "searchPlaceholder": "Search by name, owner email or ID", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/es.json b/apps/builder/messages/es.json index 4f67624153..b08fa8545b 100644 --- a/apps/builder/messages/es.json +++ b/apps/builder/messages/es.json @@ -6258,6 +6258,23 @@ "searchPlaceholder": "Buscar por nombre, correo del propietario o ID", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/fi.json b/apps/builder/messages/fi.json index ef4016f467..65aa850b9d 100644 --- a/apps/builder/messages/fi.json +++ b/apps/builder/messages/fi.json @@ -6258,6 +6258,23 @@ "searchPlaceholder": "Hae nimen, omistajan sähköpostin tai tunnuksen perusteella", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/fr.json b/apps/builder/messages/fr.json index 72735b664d..c002b0447d 100644 --- a/apps/builder/messages/fr.json +++ b/apps/builder/messages/fr.json @@ -6258,6 +6258,23 @@ "searchPlaceholder": "Rechercher par nom, e-mail du propriétaire ou ID", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/he.json b/apps/builder/messages/he.json index eef346d63d..f04b9e684c 100644 --- a/apps/builder/messages/he.json +++ b/apps/builder/messages/he.json @@ -4123,6 +4123,23 @@ "searchPlaceholder": "חפש לפי שם, אימייל של הבעלים או מזהה", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/id.json b/apps/builder/messages/id.json index 33463edba4..6c71d8cf3d 100644 --- a/apps/builder/messages/id.json +++ b/apps/builder/messages/id.json @@ -6258,6 +6258,23 @@ "searchPlaceholder": "Cari berdasarkan nama, email pemilik, atau ID", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/it.json b/apps/builder/messages/it.json index 0eba6cdda3..269574a438 100644 --- a/apps/builder/messages/it.json +++ b/apps/builder/messages/it.json @@ -6258,6 +6258,23 @@ "searchPlaceholder": "Cerca per nome, email del proprietario o ID", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/ja.json b/apps/builder/messages/ja.json index 3069e92c3c..53c4bb591c 100644 --- a/apps/builder/messages/ja.json +++ b/apps/builder/messages/ja.json @@ -6258,6 +6258,23 @@ "searchPlaceholder": "名前、オーナーのメール、IDで検索", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/nl.json b/apps/builder/messages/nl.json index ecf6d11d19..3fd6632ecb 100644 --- a/apps/builder/messages/nl.json +++ b/apps/builder/messages/nl.json @@ -6258,6 +6258,23 @@ "searchPlaceholder": "Zoeken op naam, e-mailadres eigenaar of ID", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/pt-BR.json b/apps/builder/messages/pt-BR.json index 87e7ef7124..16091f0b39 100644 --- a/apps/builder/messages/pt-BR.json +++ b/apps/builder/messages/pt-BR.json @@ -6258,6 +6258,23 @@ "searchPlaceholder": "Pesquisar por nome, e-mail do proprietário ou ID", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/pt-PT.json b/apps/builder/messages/pt-PT.json index bd86ae37f6..a0ea2c57ca 100644 --- a/apps/builder/messages/pt-PT.json +++ b/apps/builder/messages/pt-PT.json @@ -6258,6 +6258,23 @@ "searchPlaceholder": "Pesquisar por nome, email do proprietário ou ID", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/ro.json b/apps/builder/messages/ro.json index 8478ea3602..ff34f6b20d 100644 --- a/apps/builder/messages/ro.json +++ b/apps/builder/messages/ro.json @@ -6521,6 +6521,23 @@ "searchPlaceholder": "Căutați după nume, e-mailul proprietarului sau ID", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/sv.json b/apps/builder/messages/sv.json index 25f18e4017..d2eae36693 100644 --- a/apps/builder/messages/sv.json +++ b/apps/builder/messages/sv.json @@ -5414,6 +5414,23 @@ "searchPlaceholder": "Sök efter namn, ägarens e-post eller ID", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/tr.json b/apps/builder/messages/tr.json index a8832a4261..635bde9b16 100644 --- a/apps/builder/messages/tr.json +++ b/apps/builder/messages/tr.json @@ -6258,6 +6258,23 @@ "searchPlaceholder": "Ada, sahibinin e-postasına veya kimliğe göre ara", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/vi.json b/apps/builder/messages/vi.json index 48f9ce60d7..371a1cafc6 100644 --- a/apps/builder/messages/vi.json +++ b/apps/builder/messages/vi.json @@ -6487,6 +6487,23 @@ "searchPlaceholder": "Tìm kiếm theo tên, email chủ sở hữu hoặc ID", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/zh-CN.json b/apps/builder/messages/zh-CN.json index 7947f2c6f4..b4cd3ef4dc 100644 --- a/apps/builder/messages/zh-CN.json +++ b/apps/builder/messages/zh-CN.json @@ -5414,6 +5414,23 @@ "searchPlaceholder": "按名称、所有者邮箱或 ID 搜索", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/messages/zh-TW.json b/apps/builder/messages/zh-TW.json index 96b925f626..8b2cf49df8 100644 --- a/apps/builder/messages/zh-TW.json +++ b/apps/builder/messages/zh-TW.json @@ -6304,6 +6304,23 @@ "searchPlaceholder": "依名稱、擁有者電子郵件或 ID 搜尋", "descriptionConsentDisabled": "All workspaces can be opened by platform administrators.", "supportAccessible": "Accessible", + "periodStart": "Period start", + "periodEnd": "Period end", + "requestedBy": "Requested by", + "workspaceId": "Workspace ID", + "language": "Language", + "planSnapshot": "Plan at deletion", + "ownerQuota": "Owner quota", + "usagePeriods": "Usage periods", + "deletedTitle": "Deleted workspaces", + "deletedDescription": "Purge evidence for deleted workspaces.", + "purgedAt": "Purged at", + "deletionRequestedAt": "Deletion requested at", + "scheduledDeletionAt": "Scheduled deletion at", + "evidence": "Evidence", + "usage": "Usage snapshot", + "members": "Members", + "notAvailable": "Not available", "createButton": "Create workspace", "createTitle": "Create workspace for an owner", "createDescription": "Creates a workspace for the owner's email, adding any member emails you list. A new email gets a mailed temporary password.", diff --git a/apps/builder/src/app/admin/workspaces/deleted/page.tsx b/apps/builder/src/app/admin/workspaces/deleted/page.tsx new file mode 100644 index 0000000000..a68256dcdd --- /dev/null +++ b/apps/builder/src/app/admin/workspaces/deleted/page.tsx @@ -0,0 +1,47 @@ +import { + isSuperAdmin, + workspaceDeletionRecordService, +} from "@chatbotx.io/business" +import { notFound } from "next/navigation" +import { getTranslations } from "next-intl/server" +import type { SearchParams } from "nuqs/server" +import { Suspense } from "react" +import { DeletedWorkspacesTable } from "@/features/admin-workspaces/deleted-workspaces-table" +import { getDeletedWorkspacesSearchParamsCache } from "@/features/admin-workspaces/schema/deleted-query" +import { getCurrentUser } from "@/lib/auth/utils" + +export default async function DeletedWorkspacesPage({ + searchParams, +}: { + searchParams: Promise +}) { + const user = await getCurrentUser() + if (!(user && (await isSuperAdmin(user)))) { + return notFound() + } + + const [t, search] = await Promise.all([ + getTranslations(), + getDeletedWorkspacesSearchParamsCache.parse(await searchParams), + ]) + const records = workspaceDeletionRecordService.listForAdmin({ + ...search, + search: search.search ?? undefined, + }) + + return ( +
+
+

+ {t("platformAdmin.workspaces.deletedTitle")} +

+

+ {t("platformAdmin.workspaces.deletedDescription")} +

+
+ + + +
+ ) +} diff --git a/apps/builder/src/app/page.tsx b/apps/builder/src/app/page.tsx index 8559d0bb4b..92d79038c0 100644 --- a/apps/builder/src/app/page.tsx +++ b/apps/builder/src/app/page.tsx @@ -11,6 +11,7 @@ import { ExpiredBanner } from "@/components/expired-banner" import { WorkspaceDeletionPendingToast } from "@/components/workspace-deletion-pending-toast" import { isCloud } from "@/env" import { AccountRail } from "@/features/workspaces/components/account-rail" +import { DeletedWorkspaces } from "@/features/workspaces/components/deleted-workspaces" import WorkspacesList from "@/features/workspaces/components/workspaces-list" import { hasWorkspacePermission } from "@/lib/auth/permission-routes" import { enforcePasswordCurrent } from "@/lib/auth/require-password-current" @@ -87,15 +88,18 @@ export default async function MainPage() { user={userInfo} /> - +
+ + +
) diff --git a/apps/builder/src/features/admin-workspaces/admin-workspaces-table.tsx b/apps/builder/src/features/admin-workspaces/admin-workspaces-table.tsx index b564e239ad..1e32ec2dcf 100644 --- a/apps/builder/src/features/admin-workspaces/admin-workspaces-table.tsx +++ b/apps/builder/src/features/admin-workspaces/admin-workspaces-table.tsx @@ -35,9 +35,13 @@ function OwnerCell({ }: { row: ListAdminWorkspacesResponse["data"][number] }) { + const t = useTranslations() + return (
- {row.ownerName ?? "—"} + + {row.ownerName ?? t("platformAdmin.workspaces.notAvailable")} + {row.ownerEmail}
) @@ -94,7 +98,8 @@ export function AdminWorkspacesTable({ title={t("platformAdmin.workspaces.tenant")} /> ), - cell: ({ row }) => row.original.tenantName ?? "—", + cell: ({ row }) => + row.original.tenantName ?? t("platformAdmin.workspaces.notAvailable"), enableSorting: false, }, { diff --git a/apps/builder/src/features/admin-workspaces/deleted-workspaces-table.tsx b/apps/builder/src/features/admin-workspaces/deleted-workspaces-table.tsx new file mode 100644 index 0000000000..0251c1c9d7 --- /dev/null +++ b/apps/builder/src/features/admin-workspaces/deleted-workspaces-table.tsx @@ -0,0 +1,110 @@ +"use client" + +import { DataTable } from "@chatbotx.io/ui/components/data-table/data-table" +import { DataTableColumnHeader } from "@chatbotx.io/ui/components/data-table/data-table-column-header" +import { DataTableToolbar } from "@chatbotx.io/ui/components/data-table/data-table-toolbar" +import { useDataTable } from "@chatbotx.io/ui/hooks/use-data-table" +import type { ColumnDef } from "@tanstack/react-table" +import { format } from "date-fns" +import { useTranslations } from "next-intl" +import { use, useMemo } from "react" +import { DeletionRecordEvidence } from "@/features/workspaces/components/deletion-record-evidence" +import type { WorkspaceDeletionRecordResource } from "@/features/workspaces/schema/deletion-record" + +type DeletedWorkspacesTableProps = { + promises: Promise< + [ + { + data: WorkspaceDeletionRecordResource[] + pageCount: number + }, + ] + > +} + +export const DeletedWorkspacesTable = ({ + promises, +}: DeletedWorkspacesTableProps) => { + const [{ data, pageCount }] = use(promises) + const t = useTranslations() + + const columns = useMemo[]>( + () => [ + { + id: "search", + header: ({ column }) => ( + + ), + cell: ({ row }) => row.original.workspaceName, + meta: { + label: t("actions.search"), + placeholder: t("actions.search"), + variant: "text", + filterKey: "search", + }, + enableColumnFilter: true, + enableHiding: false, + enableSorting: false, + }, + { + id: "owner", + header: ({ column }) => ( + + ), + cell: ({ row }) => + row.original.ownerEmail ?? t("platformAdmin.workspaces.notAvailable"), + enableHiding: false, + enableSorting: false, + }, + { + id: "purgedAt", + header: ({ column }) => ( + + ), + cell: ({ row }) => + row.original.purgedAt + ? format(row.original.purgedAt, "PPp") + : t("platformAdmin.workspaces.notAvailable"), + enableHiding: false, + enableSorting: false, + }, + { + id: "evidence", + header: ({ column }) => ( + + ), + cell: ({ row }) => , + enableHiding: false, + enableSorting: false, + }, + ], + [t], + ) + + const { table } = useDataTable({ + columns, + data, + pageCount, + getRowId: (originalRow) => originalRow.id, + shallow: false, + clearOnDefault: true, + }) + + return ( + + + + ) +} diff --git a/apps/builder/src/features/admin-workspaces/schema/deleted-query.ts b/apps/builder/src/features/admin-workspaces/schema/deleted-query.ts new file mode 100644 index 0000000000..0768258549 --- /dev/null +++ b/apps/builder/src/features/admin-workspaces/schema/deleted-query.ts @@ -0,0 +1,11 @@ +import { + createSearchParamsCache, + parseAsInteger, + parseAsString, +} from "nuqs/server" + +export const getDeletedWorkspacesSearchParamsCache = createSearchParamsCache({ + page: parseAsInteger.withDefault(1), + perPage: parseAsInteger.withDefault(10), + search: parseAsString, +}) diff --git a/apps/builder/src/features/admin/components/admin-sidebar.tsx b/apps/builder/src/features/admin/components/admin-sidebar.tsx index edb25a45f5..6438243dae 100644 --- a/apps/builder/src/features/admin/components/admin-sidebar.tsx +++ b/apps/builder/src/features/admin/components/admin-sidebar.tsx @@ -56,6 +56,11 @@ export function AdminSidebar({ url: "/admin/workspaces", icon: Building2Icon, }, + { + title: t("platformAdmin.workspaces.deletedTitle"), + url: "/admin/workspaces/deleted", + icon: Building2Icon, + }, { title: t("channels.title"), url: "/admin/platform-channels", diff --git a/apps/builder/src/features/workspaces/actions/cancel-workspace-deletion-action.ts b/apps/builder/src/features/workspaces/actions/cancel-workspace-deletion-action.ts index d0fca1a8b5..74d32fd05a 100644 --- a/apps/builder/src/features/workspaces/actions/cancel-workspace-deletion-action.ts +++ b/apps/builder/src/features/workspaces/actions/cancel-workspace-deletion-action.ts @@ -19,20 +19,17 @@ export const cancelWorkspaceDeletionAction = workspaceActionClientAllowExpired }: { bindArgsParsedInputs: WorkspaceIdRequestParams }) => { + const t = await getTranslations() const currentUserAndTargetWorkspace = await getCurrentUserAndTargetWorkspace(workspaceId) if (!currentUserAndTargetWorkspace) { - throw new ChatbotXException( - "You are not authorized to restore this workspace", - ) + throw new ChatbotXException(t("errors.superAdminRequired")) } const { permissions } = currentUserAndTargetWorkspace.targetWorkspaceMember if (!hasWorkspacePermission(permissions, "superAdmin")) { - throw new ChatbotXException( - "You need to be a super admin to restore this workspace", - ) + throw new ChatbotXException(t("errors.superAdminRequired")) } try { @@ -44,7 +41,6 @@ export const cancelWorkspaceDeletionAction = workspaceActionClientAllowExpired err instanceof ChatbotXException && err.code === "workspaceDeletionStarted" ) { - const t = await getTranslations() throw new ChatbotXException( t("workspace.deletion.alreadyStarted"), err.code, diff --git a/apps/builder/src/features/workspaces/actions/schedule-workspace-deletion-action.ts b/apps/builder/src/features/workspaces/actions/schedule-workspace-deletion-action.ts index 44b5842284..3b3b72433a 100644 --- a/apps/builder/src/features/workspaces/actions/schedule-workspace-deletion-action.ts +++ b/apps/builder/src/features/workspaces/actions/schedule-workspace-deletion-action.ts @@ -1,10 +1,8 @@ "use server" -import { - workspaceLifecycleService, - workspaceService, -} from "@chatbotx.io/business" +import { workspaceService } from "@chatbotx.io/business" import { ChatbotXException } from "@chatbotx.io/business/errors" +import { getTranslations } from "next-intl/server" import { type WorkspaceIdRequestParams, workspaceIdrequestParams, @@ -21,26 +19,22 @@ export const scheduleWorkspaceDeletionAction = workspaceActionClientAllowExpired }: { bindArgsParsedInputs: WorkspaceIdRequestParams }) => { + const t = await getTranslations() const currentUserAndTargetWorkspace = await getCurrentUserAndTargetWorkspace(workspaceId) if (!currentUserAndTargetWorkspace) { - throw new ChatbotXException( - "You are not authorized to delete this workspace", - ) + throw new ChatbotXException(t("errors.superAdminRequired")) } const { permissions } = currentUserAndTargetWorkspace.targetWorkspaceMember if (!hasWorkspacePermission(permissions, "superAdmin")) { - throw new ChatbotXException( - "You need to be a super admin to delete this workspace", - ) + throw new ChatbotXException(t("errors.superAdminRequired")) } await workspaceService.scheduleDeletion({ + actorId: currentUserAndTargetWorkspace.user.id, id: workspaceId, }) - - await workspaceLifecycleService.freezeWorkspaceRuntime(workspaceId) }, ) diff --git a/apps/builder/src/features/workspaces/api/private.ts b/apps/builder/src/features/workspaces/api/private.ts index 01642dec72..5f6a1a620c 100644 --- a/apps/builder/src/features/workspaces/api/private.ts +++ b/apps/builder/src/features/workspaces/api/private.ts @@ -1,6 +1,10 @@ -import { workspaceMemberService } from "@chatbotx.io/business" +import { + workspaceDeletionRecordService, + workspaceMemberService, +} from "@chatbotx.io/business" import z from "zod" import { authorizedAPI } from "@/orpc" +import { workspaceDeletionRecordResource } from "../schema/deletion-record" import { workspaceResource } from "../schema/resource" export const workspacesAuthenticatedAPI = { @@ -19,4 +23,32 @@ export const workspacesAuthenticatedAPI = { }) return { workspaces: members.map((member) => member.workspace) } }), + + listDeletedWorkspacesAPI: authorizedAPI + .route({ + method: "GET", + path: "/users/me/workspaces/deleted", + summary: "List the current user's deleted workspace evidence", + tags: ["Workspaces"], + }) + .input( + z.object({ + page: z.number().int().positive().default(1), + perPage: z.number().int().positive().max(100).default(20), + }), + ) + .output( + z.object({ + data: z.array(workspaceDeletionRecordResource), + pageCount: z.number().int().nonnegative(), + }), + ) + .handler( + async ({ context, input }) => + await workspaceDeletionRecordService.listForOwner({ + ownerId: context.user.id, + page: input.page, + perPage: input.perPage, + }), + ), } diff --git a/apps/builder/src/features/workspaces/components/deleted-workspaces.tsx b/apps/builder/src/features/workspaces/components/deleted-workspaces.tsx new file mode 100644 index 0000000000..9144f5b9ca --- /dev/null +++ b/apps/builder/src/features/workspaces/components/deleted-workspaces.tsx @@ -0,0 +1,33 @@ +import { workspaceDeletionRecordService } from "@chatbotx.io/business" +import { getTranslations } from "next-intl/server" +import { DeletionRecordEvidence } from "./deletion-record-evidence" + +export const DeletedWorkspaces = async ({ ownerId }: { ownerId: string }) => { + const [t, records] = await Promise.all([ + getTranslations(), + workspaceDeletionRecordService.listForOwner({ + ownerId, + page: 1, + perPage: 20, + }), + ]) + if (records.data.length === 0) { + return null + } + + return ( +
+

+ {t("platformAdmin.workspaces.deletedTitle")} +

+
    + {records.data.map((record) => ( +
  • +
    {record.workspaceName}
    + +
  • + ))} +
+
+ ) +} diff --git a/apps/builder/src/features/workspaces/components/deletion-record-evidence.tsx b/apps/builder/src/features/workspaces/components/deletion-record-evidence.tsx new file mode 100644 index 0000000000..9622ead207 --- /dev/null +++ b/apps/builder/src/features/workspaces/components/deletion-record-evidence.tsx @@ -0,0 +1,294 @@ +"use client" + +import { format } from "date-fns" +import Image from "next/image" +import { useTranslations } from "next-intl" +import type { WorkspaceDeletionRecordResource } from "@/features/workspaces/schema/deletion-record" + +type PeriodUsage = + WorkspaceDeletionRecordResource["usageSnapshot"]["mac"][number] + +type DeletionRecordEvidenceProps = { + record: WorkspaceDeletionRecordResource +} + +type EvidenceFieldProps = { + label: string + value: string | number +} + +type UsagePeriodListProps = { + formatPeriod: (period: PeriodUsage) => string + label: string + notAvailable: string + periods: PeriodUsage[] +} + +const EvidenceField = ({ label, value }: EvidenceFieldProps) => ( +
+
{label}
+
{value}
+
+) + +const UsagePeriodList = ({ + formatPeriod, + label, + notAvailable, + periods, +}: UsagePeriodListProps) => ( +
+
{label}
+ {periods.length > 0 ? ( +
    + {periods.map((period) => ( +
  • + {period.count} + + {formatPeriod(period)} + +
  • + ))} +
+ ) : ( +

{notAvailable}

+ )} +
+) + +export const DeletionRecordEvidence = ({ + record, +}: DeletionRecordEvidenceProps) => { + const t = useTranslations() + const notAvailable = t("platformAdmin.workspaces.notAvailable") + const formatDate = (value: Date | string | null) => + value ? format(value, "PPp") : notAvailable + const formatPeriod = (period: PeriodUsage) => + `${formatDate(period.periodStart)} – ${formatDate(period.periodEnd)}` + const workspace = record.details.workspace + const owner = record.details.owner + const requestedBy = record.details.requestedBy + const plan = record.details.plan + const ownerQuota = record.usageSnapshot.ownerQuota + + return ( +
+ + {t("platformAdmin.workspaces.evidence")} + +
+
+
+ {workspace.logo && ( + {workspace.name} + )} +

+ {t("fields.workspace.label")} +

+
+
+ + + + +
+
+ +
+ + + + + +
+ +
+

+ {t("platformAdmin.workspaces.planSnapshot")} +

+
+ + + + +
+
+ +
+

+ {t("platformAdmin.workspaces.usage")} +

+
+ + + +
+
+ +
+

+ {t("platformAdmin.workspaces.usagePeriods")} +

+
+ + +
+
+ +
+

+ {t("platformAdmin.workspaces.ownerQuota")} +

+ {ownerQuota ? ( +
+ + + + + + + +
+ ) : ( +

{notAvailable}

+ )} +
+ +
+

{t("channels.title")}

+ {record.details.channels.length > 0 ? ( +
    + {record.details.channels.map((channel) => ( +
  • +
    {channel.name}
    +
    + {channel.channel} · {channel.status} +
    +
  • + ))} +
+ ) : ( +

{notAvailable}

+ )} +
+ +
+

+ {t("platformAdmin.workspaces.members")} +

+ {record.details.members.length > 0 ? ( +
    + {record.details.members.map((member) => ( +
  • +
    + {member.name ?? member.email ?? notAvailable} +
    +
    + {[member.email, member.role].filter(Boolean).join(" · ")} +
    +
  • + ))} +
+ ) : ( +

{notAvailable}

+ )} +
+
+
+ ) +} diff --git a/apps/builder/src/features/workspaces/schema/deletion-record.ts b/apps/builder/src/features/workspaces/schema/deletion-record.ts new file mode 100644 index 0000000000..cdb779852b --- /dev/null +++ b/apps/builder/src/features/workspaces/schema/deletion-record.ts @@ -0,0 +1,27 @@ +import { + workspaceDeletionRecordDetailsSchema, + workspaceDeletionRecordUsageSnapshotSchema, +} from "@chatbotx.io/database/schema" +import z from "zod" + +export const workspaceDeletionRecordResource = z.object({ + id: z.string(), + workspaceId: z.string(), + workspaceName: z.string(), + ownerId: z.string(), + ownerEmail: z.string().nullable(), + tenantId: z.string(), + deletionRequestedById: z.string().nullable(), + deletionRequestedByEmail: z.string().nullable(), + deletionRequestedAt: z.date().nullable(), + scheduledDeletionAt: z.date().nullable(), + purgedAt: z.date().nullable(), + details: workspaceDeletionRecordDetailsSchema, + usageSnapshot: workspaceDeletionRecordUsageSnapshotSchema, + createdAt: z.date(), + updatedAt: z.date(), +}) + +export type WorkspaceDeletionRecordResource = z.infer< + typeof workspaceDeletionRecordResource +> diff --git a/apps/worker/__tests__/message-analytics-quota.test.ts b/apps/worker/__tests__/message-analytics-quota.test.ts index 78363091e8..2507ca9016 100644 --- a/apps/worker/__tests__/message-analytics-quota.test.ts +++ b/apps/worker/__tests__/message-analytics-quota.test.ts @@ -1,6 +1,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest" const mocks = vi.hoisted(() => ({ + incrementBotUsage: vi.fn(), incrementBy: vi.fn(), incrementUsage: vi.fn(), recordEvents: vi.fn(), @@ -12,6 +13,7 @@ vi.mock("@chatbotx.io/analytics", () => ({ })) vi.mock("@chatbotx.io/business", () => ({ quotaEnforcementService: { incrementBy: mocks.incrementBy }, + workspaceBotMessageUsageService: { increment: mocks.incrementBotUsage }, workspaceService: { findById: mocks.findById }, workspaceUsageService: { increment: mocks.incrementUsage }, })) @@ -33,9 +35,13 @@ describe("handleBotMessageSent quota accounting", () => { vi.clearAllMocks() mocks.recordEvents.mockResolvedValue(undefined) mocks.incrementBy.mockResolvedValue(undefined) + mocks.incrementBotUsage.mockResolvedValue(undefined) mocks.incrementUsage.mockResolvedValue(undefined) mocks.findById.mockImplementation(({ id }: { id: string }) => - Promise.resolve({ ownerId: `owner-${id}` }), + Promise.resolve({ + ownerId: `owner-${id}`, + tenantId: `tenant-${id}`, + }), ) }) @@ -67,6 +73,18 @@ describe("handleBotMessageSent quota accounting", () => { metric: "monthlyBotMessages", count: 1, }) + expect(mocks.incrementBotUsage).toHaveBeenCalledWith({ + count: 2, + ownerId: "owner-workspace-1", + tenantId: "tenant-workspace-1", + workspaceId: "workspace-1", + }) + expect(mocks.incrementBotUsage).toHaveBeenCalledWith({ + count: 1, + ownerId: "owner-workspace-2", + tenantId: "tenant-workspace-2", + workspaceId: "workspace-2", + }) expect(mocks.incrementUsage).toHaveBeenCalledTimes(2) expect(mocks.incrementUsage).toHaveBeenCalledWith( "workspace-1", @@ -80,13 +98,35 @@ describe("handleBotMessageSent quota accounting", () => { ) }) - it("swallows quota failures after recording analytics", async () => { + it("writes the ledger when quota accounting fails", async () => { mocks.incrementBy.mockRejectedValue(new Error("quota unavailable")) await expect(handleBotMessageSent([payload("workspace-1")])).resolves.toBe( undefined, ) + expect(mocks.recordEvents).toHaveBeenCalledOnce() + expect(mocks.incrementBotUsage).toHaveBeenCalledWith({ + count: 1, + ownerId: "owner-workspace-1", + tenantId: "tenant-workspace-1", + workspaceId: "workspace-1", + }) + }) + + it("increments quota when the ledger write fails", async () => { + mocks.incrementBotUsage.mockRejectedValue(new Error("ledger unavailable")) + + await expect(handleBotMessageSent([payload("workspace-1")])).resolves.toBe( + undefined, + ) + + expect(mocks.incrementBy).toHaveBeenCalledTimes(2) + expect(mocks.incrementUsage).toHaveBeenCalledWith( + "workspace-1", + "botMessages", + 1, + ) }) it("isolates a failing workspace so others still get incremented", async () => { diff --git a/apps/worker/__tests__/sync-user-quota-mac.test.ts b/apps/worker/__tests__/sync-user-quota-mac.test.ts index 2f86bd8198..1e8180fe2c 100644 --- a/apps/worker/__tests__/sync-user-quota-mac.test.ts +++ b/apps/worker/__tests__/sync-user-quota-mac.test.ts @@ -7,60 +7,60 @@ const P2 = "2026-07-01T00:00:00.000Z" describe("resolveMacReconcileAction", () => { test("is a no-op when nothing is tracked or stored", () => { expect(resolveMacReconcileAction(null, null, 0, P1)).toEqual({ + raiseMacUsed: null, setLiveMac: null, stampPeriod: false, - persistMacUsed: null, }) }) test("resets the live counter when the billing cycle rolled over", () => { // Private quota-worker advanced periodStart and zeroed macUsed (recurring). expect(resolveMacReconcileAction("40", P1, 0, P2)).toEqual({ + raiseMacUsed: null, setLiveMac: 0, stampPeriod: true, - persistMacUsed: null, }) }) test("does not reset a lifetime plan (period stamp never changes)", () => { // Lifetime: periodStart is stable, so the stamp always equals the DB period. expect(resolveMacReconcileAction("40", P1, 40, P1)).toEqual({ + raiseMacUsed: null, setLiveMac: null, stampPeriod: false, - persistMacUsed: null, }) }) test("treats an empty period (no plan period) as stable — never resets", () => { expect(resolveMacReconcileAction("40", "", 40, "")).toEqual({ + raiseMacUsed: null, setLiveMac: null, stampPeriod: false, - persistMacUsed: null, }) }) test("snapshots the live count into the DB within the same period", () => { expect(resolveMacReconcileAction("55", P1, 40, P1)).toEqual({ + raiseMacUsed: 55, setLiveMac: null, stampPeriod: false, - persistMacUsed: 55, }) }) test("adopts and stamps an unstamped live counter without wiping it", () => { // HINCRBY from mac-tracking creates `mac` without a period stamp. expect(resolveMacReconcileAction("12", null, 0, P1)).toEqual({ + raiseMacUsed: 12, setLiveMac: null, stampPeriod: true, - persistMacUsed: 12, }) }) test("seeds the DB value when the live counter is absent but DB has usage", () => { expect(resolveMacReconcileAction(null, P1, 30, P1)).toEqual({ + raiseMacUsed: null, setLiveMac: null, stampPeriod: false, - persistMacUsed: null, }) }) }) diff --git a/apps/worker/__tests__/sync-user-quota-reconcile.test.ts b/apps/worker/__tests__/sync-user-quota-reconcile.test.ts index 34bc0cef4d..b65313aa63 100644 --- a/apps/worker/__tests__/sync-user-quota-reconcile.test.ts +++ b/apps/worker/__tests__/sync-user-quota-reconcile.test.ts @@ -17,6 +17,7 @@ const state = { stored: null as Record | null, // Every macUsed value the handler persisted, in order. persistedMac: [] as number[], + liveMacRaises: [] as { periodIso: string; value: number }[], // Truthy once reconcileUserSelfUsage ran for a user (the self-count path). selfReconciledUsers: [] as string[], hsetCalls: [] as unknown[][], @@ -81,10 +82,16 @@ vi.mock("@chatbotx.io/business", () => ({ | undefined) ?? null, }) }), - persistMacUsed: vi.fn((_userId: string, value: number) => { + raiseMacUsed: vi.fn(({ value }: { value: number }) => { state.persistedMac.push(value) return Promise.resolve() }), + raiseLiveMac: vi.fn( + ({ periodIso, value }: { periodIso: string; value: number }) => { + state.liveMacRaises.push({ periodIso, value }) + return Promise.resolve() + }, + ), applyMonthlyBotMessagesReset: vi.fn(async () => undefined), }, // The ghost-id existence filter lives on the service, not a raw `db.select` @@ -127,9 +134,15 @@ vi.mock("@chatbotx.io/redis", () => ({ distributedStore: { delete: vi.fn(async () => undefined) }, })) -const countActiveContactsForOwner = vi.fn(async () => state.ledgerMac) vi.mock("@chatbotx.io/analytics", () => ({ - macRepository: { countActiveContactsForOwner }, + anchoredPeriod: (_now: Date, periodStart: Date) => ({ + start: periodStart, + }), +})) + +const sumForOwner = vi.fn(async () => state.ledgerMac) +vi.mock("@chatbotx.io/database/repositories/workspace-mac", () => ({ + workspaceMacRepository: { sumForOwner }, })) vi.mock("../src/lib/logger", () => ({ @@ -151,7 +164,7 @@ const { tenantService, userQuotaService } = (await import( userQuotaService: { reconcileOwnerPoolUsage: ReturnType reconcileUserSelfUsage: ReturnType - persistMacUsed: ReturnType + raiseMacUsed: ReturnType clearLiveCounters: ReturnType } } @@ -169,7 +182,7 @@ describe("reconcileUser — the non-reseller path delegates the self-count", () state.hmgetResult = [null, null] state.ledgerMac = 0 redisClient.hset.mockClear() - countActiveContactsForOwner.mockClear() + sumForOwner.mockClear() }) // The authoritative COUNT(*) reads, the direct-assignment (never GREATEST) @@ -200,10 +213,11 @@ describe("reconcileUser — macUsed is derived from the ContactActiveMonthly led beforeEach(() => { state.persistedMac = [] + state.liveMacRaises = [] state.selfReconciledUsers = [] state.hsetCalls = [] redisClient.hset.mockClear() - countActiveContactsForOwner.mockClear() + sumForOwner.mockClear() state.ledgerMac = 0 }) @@ -220,19 +234,37 @@ describe("reconcileUser — macUsed is derived from the ContactActiveMonthly led await reconcileUser("user-1") - expect(countActiveContactsForOwner).toHaveBeenCalledWith( - expect.objectContaining({ ownerId: "user-1", cumulative: false }), - ) - // The live counter is re-grounded on the ledger truth. + expect(sumForOwner).toHaveBeenCalledWith({ + ownerId: "user-1", + periodStart: new Date(PERIOD), + cumulative: false, + }) + expect(state.liveMacRaises).toContainEqual({ + periodIso: PERIOD, + value: 7, + }) + expect(state.persistedMac).toContain(7) + }) + + test("adopts an unstamped live counter before attempting ledger repair", async () => { + state.hmgetResult = ["12", null] + state.ledgerMac = 7 + state.stored = { + macUsed: 5, + periodStart: new Date(PERIOD), + periodEnd: new Date("2026-07-01T00:00:00.000Z"), + monthlyBotMessagesPeriodStart: null, + } + + await reconcileUser("user-1") + + expect(sumForOwner).not.toHaveBeenCalled() expect(state.hsetCalls).toContainEqual([ "user-quota-live:user-1", - "mac", - "7", "macPeriodStart", PERIOD, ]) - // macUsed is persisted to the ledger count (self-heals the drift). - expect(state.persistedMac).toContain(7) + expect(state.persistedMac).toContain(12) }) test("lifetime plan (no periodEnd) keeps the accumulate path, not the ledger", async () => { @@ -247,9 +279,14 @@ describe("reconcileUser — macUsed is derived from the ContactActiveMonthly led await reconcileUser("user-1") - expect(countActiveContactsForOwner).not.toHaveBeenCalled() - // No mac drift to persist (live === DB within the stable lifetime period). - expect(state.persistedMac).toHaveLength(0) + expect(sumForOwner).toHaveBeenCalledWith({ + ownerId: "user-1", + periodStart: null, + cumulative: true, + }) + // The service applies GREATEST, so this lower ledger observation cannot + // reduce the durable lifetime total. + expect(state.persistedMac).toEqual([4]) }) }) diff --git a/apps/worker/src/events/analytics/message.ts b/apps/worker/src/events/analytics/message.ts index 4d7f603751..46f6f4dd71 100644 --- a/apps/worker/src/events/analytics/message.ts +++ b/apps/worker/src/events/analytics/message.ts @@ -1,6 +1,7 @@ import { messageAnalyticsService } from "@chatbotx.io/analytics" import { quotaEnforcementService, + workspaceBotMessageUsageService, workspaceService, workspaceUsageService, } from "@chatbotx.io/business" @@ -38,21 +39,43 @@ export async function handleBotMessageSent( [...countsByWorkspace].map(async ([workspaceId, count]) => { try { const workspace = await workspaceService.findById({ id: workspaceId }) - await quotaEnforcementService.incrementBy({ - userId: workspace.ownerId, - metric: "botMessages", - count, - }) - await quotaEnforcementService.incrementBy({ - userId: workspace.ownerId, - metric: "monthlyBotMessages", - count, - }) - await workspaceUsageService.increment(workspaceId, "botMessages", count) + const [quotaResult, ledgerResult] = await Promise.allSettled([ + Promise.all([ + quotaEnforcementService.incrementBy({ + userId: workspace.ownerId, + metric: "botMessages", + count, + }), + quotaEnforcementService.incrementBy({ + userId: workspace.ownerId, + metric: "monthlyBotMessages", + count, + }), + workspaceUsageService.increment(workspaceId, "botMessages", count), + ]), + workspaceBotMessageUsageService.increment({ + count, + ownerId: workspace.ownerId, + tenantId: workspace.tenantId, + workspaceId, + }), + ]) + if (quotaResult.status === "rejected") { + logger.error( + { err: quotaResult.reason, workspaceId, count }, + "[analytics] bot message quota increment failed", + ) + } + if (ledgerResult.status === "rejected") { + logger.error( + { err: ledgerResult.reason, workspaceId, count }, + "[analytics] bot message usage ledger write failed", + ) + } } catch (err) { logger.error( { err, workspaceId, count }, - "[analytics] bot message quota increment failed", + "[analytics] bot message workspace lookup failed", ) } }), diff --git a/apps/worker/src/schedule/handlers/sync-user-quota.ts b/apps/worker/src/schedule/handlers/sync-user-quota.ts index 2e05e8f532..a025afca2f 100644 --- a/apps/worker/src/schedule/handlers/sync-user-quota.ts +++ b/apps/worker/src/schedule/handlers/sync-user-quota.ts @@ -1,4 +1,4 @@ -import { macRepository } from "@chatbotx.io/analytics" +import { anchoredPeriod, macRepository } from "@chatbotx.io/analytics" import { parseLiveCount, tenantService, @@ -8,6 +8,7 @@ import { workspaceUsageService, } from "@chatbotx.io/business" import { isForeignKeyViolationError } from "@chatbotx.io/database/client" +import { workspaceMacRepository } from "@chatbotx.io/database/repositories/workspace-mac" import { cacheConnections } from "@chatbotx.io/redis" import { liveKeyFor, USER_QUOTA_LABEL } from "@chatbotx.io/utils" import { logger } from "../../lib/logger" @@ -244,36 +245,29 @@ const reconcileMac = async ( MAC_PERIOD_FIELD, ) - const rolledOver = livePeriod !== null && livePeriod !== dbPeriodIso - - // Resetting plan settled in its current period → the `ContactActiveMonthly` - // ledger is the durable source of truth (every MAC increment writes a - // presence row in the same transaction as the live-counter bump). Re-ground - // both the live counter and `macUsed` on the ledger count so a lost Redis - // increment self-heals. Excluded — handled by the stamp logic below: - // - period-less owners (no anchor, not MAC-tracked); - // - lifetime plans (accumulate across months, never reset); - // - a just-detected cycle rollover (defer to the private quota-worker's - // reset, then ledger-reconcile on the next run once stamped). - if (dbPeriodIso && !isLifetime && !rolledOver) { - const ledgerMac = await macRepository.countActiveContactsForOwner({ + const _rolledOver = livePeriod !== null && livePeriod !== dbPeriodIso + + // The retained owner-keyed rollup is durable billing evidence. Its value may + // repair a lost increment, but never lowers usage in an active period. + if (dbPeriodIso && livePeriod === dbPeriodIso) { + const periodStart = isLifetime + ? null + : anchoredPeriod(new Date(), new Date(dbPeriodIso)).start + const ledgerMac = await workspaceMacRepository.sumForOwner({ ownerId: userId, - billingPeriodStart: new Date(dbPeriodIso), - cumulative: false, + periodStart, + cumulative: isLifetime, + }) + await userQuotaService.raiseLiveMac({ + userId, + value: ledgerMac, + periodIso: dbPeriodIso, + }) + await userQuotaService.raiseMacUsed({ + userId, + value: ledgerMac, + periodStart: new Date(dbPeriodIso), }) - - if (liveMacRaw !== String(ledgerMac) || livePeriod !== dbPeriodIso) { - await client.hset( - liveKey, - MAC_FIELD, - String(ledgerMac), - MAC_PERIOD_FIELD, - dbPeriodIso, - ) - } - if (ledgerMac !== dbMacUsed) { - await userQuotaService.persistMacUsed(userId, ledgerMac) - } return } @@ -296,8 +290,12 @@ const reconcileMac = async ( await client.hset(liveKey, MAC_PERIOD_FIELD, dbPeriodIso) } - if (action.persistMacUsed !== null) { - await userQuotaService.persistMacUsed(userId, action.persistMacUsed) + if (action.raiseMacUsed !== null && dbPeriodIso) { + await userQuotaService.raiseMacUsed({ + userId, + value: action.raiseMacUsed, + periodStart: new Date(dbPeriodIso), + }) } } @@ -401,8 +399,8 @@ const reconcileMonthlyBotMessages = async ( /** What `reconcileMac` should write, derived purely from the current state. */ export interface MacReconcileAction { - /** Persist this value to `UserQuota.macUsed` (null = no DB write). */ - persistMacUsed: number | null + /** Raise `UserQuota.macUsed` to this value (null = no DB write). */ + raiseMacUsed: number | null /** Overwrite the live `mac` field with this value (null = leave it). */ setLiveMac: number | null /** (Re)stamp the live period field to the DB period. */ @@ -410,9 +408,9 @@ export interface MacReconcileAction { } const NO_OP: MacReconcileAction = { + raiseMacUsed: null, setLiveMac: null, stampPeriod: false, - persistMacUsed: null, } /** @@ -436,7 +434,7 @@ export function resolveMacReconcileAction( } if (livePeriod !== null && livePeriod !== dbPeriodIso) { - return { setLiveMac: dbMacUsed, stampPeriod: true, persistMacUsed: null } + return { raiseMacUsed: null, setLiveMac: dbMacUsed, stampPeriod: true } } // Fail closed on a corrupt (non-numeric) live field: fall back to the DB value @@ -444,8 +442,8 @@ export function resolveMacReconcileAction( // integer `macUsed` column and corrupt the durable count. const liveMac = parseLiveCount(liveMacRaw) ?? dbMacUsed return { + raiseMacUsed: liveMac === dbMacUsed ? null : liveMac, setLiveMac: null, stampPeriod: livePeriod === null, - persistMacUsed: liveMac === dbMacUsed ? null : liveMac, } } diff --git a/docs/tenancy.md b/docs/tenancy.md index 0308c00e61..735267d2a1 100644 --- a/docs/tenancy.md +++ b/docs/tenancy.md @@ -324,17 +324,22 @@ Every `consume` and `incrementBy` call on `UserQuotaService` is write-through: i - **Reseller owner with active tenant** → calls `userQuotaService.reconcileOwnerPoolUsage(ownerId, tenantId)`: runs five parallel `COUNT(*)`/`SUM` queries scoped to `workspaceModel.tenantId` and writes the authoritative current counts to both the `UserQuota` row and the Redis live hash. - **Everyone else** → runs per-owner self-count queries scoped to `workspaceModel.ownerId` and writes the same columns. -Counts are written directly (not `GREATEST`), so a reconcile tick always self-heals any drift. +Capacity counts are written directly (not `GREATEST`), so a reconcile tick self-heals drift and resource deletion frees capacity. -Reconcile is a **backstop**, not the only place counts shrink. `contacts`/`mac` release synchronously -when `contactService.delete()` removes a contact, and `channels` releases synchronously when +### MAC billing ledger + +MAC is different: `WorkspaceMac` is an owner-keyed, period-scoped billing ledger. MAC is incremented with the monthly-contact presence insert and retained after a workspace is deleted; reconciliation sums that retained rollup and raises `UserQuota.macUsed` with `GREATEST`. Deleting contacts or a workspace therefore never reduces billed MAC during a period. Only the private `quota-worker` resets MAC when it advances the billing period. + +Workspace deletion records retain the workspace name, owner/requester email, membership and channel summaries, and billing rollups for billing-dispute and legal-claims evidence. They are retained outside Workspace cascades and are not exposed through workspace API tokens. + +Reconcile remains a **backstop** for capacity counters. `contacts` release synchronously +when `contactService.delete()` removes a contact, and `channels` release synchronously when `inboxService.disconnect()` disconnects a channel — both call the existing `quotaEnforcementService.release`/`releaseBy` (pool-aware, floor-at-zero) right at the delete/disconnect call site, best-effort (`.catch()` + log, never blocking the delete). A workspace hard-delete -(`workspaceService.purgeDueScheduled`) instead calls `userQuotaService.reconcileOwnerPoolUsage` for the -affected owner immediately after the batch delete — a full absolute recount, since a workspace teardown -cascades away its contacts/channels/MAC too. The scheduled reconcile above remains the authority for -races, failures in the synchronous release, and any other drift. +(`workspaceService.purgeDueScheduled`) reconciles capacity for the affected owner immediately after the +batch delete. The scheduled reconcile remains the authority for races, failures in the synchronous +release, and other drift. The private `quota-worker` remains the authority for plan limits and period resets; this repository also owns the runtime trial-expiry lifecycle: an expired cloud trial enters a blocked, read/delete-only diff --git a/packages/analytics/__tests__/mac-analytics.service.test.ts b/packages/analytics/__tests__/mac-analytics.service.test.ts index bbe63daaa0..876bbf4580 100644 --- a/packages/analytics/__tests__/mac-analytics.service.test.ts +++ b/packages/analytics/__tests__/mac-analytics.service.test.ts @@ -3,7 +3,6 @@ import { beforeEach, describe, expect, test, vi } from "vitest" const macRepository = { getActiveContactCountByWorkspaceId: vi.fn(async () => ({ macCount: 0 })), countActiveContactsByWorkspace: vi.fn(async () => 0), - reconcilePeriod: vi.fn(async () => undefined), } vi.mock("../src/repositories/postgres/mac.repository", () => ({ macRepository, @@ -15,12 +14,6 @@ const distributedStore = { } vi.mock("@chatbotx.io/redis", () => ({ distributedStore })) -const txClient = { tx: true } -const db = { - transaction: vi.fn(async (cb: (tx: unknown) => unknown) => cb(txClient)), -} -vi.mock("@chatbotx.io/database/client", () => ({ db })) - const logger = { warn: vi.fn(), error: vi.fn(), info: vi.fn() } vi.mock("../src/lib/logger", () => ({ logger })) @@ -31,18 +24,15 @@ const { MacAnalyticsService } = await import( beforeEach(() => { distributedStore.getNumber.mockClear() distributedStore.setNumberIfNotExists.mockClear() - db.transaction.mockClear() logger.error.mockClear() macRepository.getActiveContactCountByWorkspaceId.mockClear() macRepository.countActiveContactsByWorkspace.mockClear() - macRepository.reconcilePeriod.mockClear() distributedStore.getNumber.mockResolvedValue(null) distributedStore.setNumberIfNotExists.mockResolvedValue(undefined) macRepository.getActiveContactCountByWorkspaceId.mockResolvedValue({ macCount: 0, }) macRepository.countActiveContactsByWorkspace.mockResolvedValue(0) - macRepository.reconcilePeriod.mockResolvedValue(undefined) }) describe("MacAnalyticsService.getActiveContactCountByWorkspaceId", () => { @@ -133,14 +123,4 @@ describe("MacAnalyticsService — repository delegation", () => { ) expect(distributedStore.getNumber).not.toHaveBeenCalled() }) - - test("reconcilePeriod runs the repository call inside a transaction", async () => { - const input = { - workspaceId: "ws-1", - periodStart: "2026-05-01T00:00:00.000Z", - } - await new MacAnalyticsService().reconcilePeriod(input) - expect(db.transaction).toHaveBeenCalledTimes(1) - expect(macRepository.reconcilePeriod).toHaveBeenCalledWith(input, txClient) - }) }) diff --git a/packages/analytics/__tests__/mac.repository.test.ts b/packages/analytics/__tests__/mac.repository.test.ts index 4e774f037f..e03d3f195b 100644 --- a/packages/analytics/__tests__/mac.repository.test.ts +++ b/packages/analytics/__tests__/mac.repository.test.ts @@ -9,6 +9,7 @@ import type { const sql = (strings: TemplateStringsArray, ...values: unknown[]) => ({ strings, values, + as: (alias: string) => ({ alias, strings, values }), }) const resultQueue: unknown[][] = [] @@ -21,6 +22,7 @@ function nextResult(): unknown[] { const CHAIN_METHODS = [ "values", + "select", "onConflictDoUpdate", "onConflictDoNothing", "returning", @@ -60,6 +62,9 @@ const gte = vi.fn((...args: unknown[]) => ({ op: "gte", args })) const gt = vi.fn((...args: unknown[]) => ({ op: "gt", args })) const inArray = vi.fn((...args: unknown[]) => ({ op: "inArray", args })) const lte = vi.fn((...args: unknown[]) => ({ op: "lte", args })) +const isNull = vi.fn((column: unknown) => ({ op: "isNull", args: [column] })) +const or = vi.fn((...args: unknown[]) => args) +const sum = vi.fn((column: unknown) => ({ __sum: true, column })) vi.mock("@chatbotx.io/database/client", () => ({ db: { @@ -68,7 +73,6 @@ vi.mock("@chatbotx.io/database/client", () => ({ update: dbUpdate, select: dbSelect, }, - sql, and, count: () => ({ __count: true }), countDistinct, @@ -77,15 +81,22 @@ vi.mock("@chatbotx.io/database/client", () => ({ gt, gte, inArray, + isNull, lt: (...args: unknown[]) => args, lte, + or, + sql, + sum, })) - vi.mock("@chatbotx.io/database/schema", () => ({ workspaceMacModel: { id: "wm.id", + macCount: "wm.macCount", + ownerId: "wm.ownerId", periodEnd: "wm.periodEnd", periodStart: "wm.periodStart", + tenantId: "wm.tenantId", + workspaceId: "wm.workspaceId", }, contactActiveMonthlyModel: { contactId: "cam.contactId", @@ -109,9 +120,12 @@ vi.mock("@chatbotx.io/database/schema", () => ({ channel: "inbox.channel", workspaceId: "inbox.workspaceId", }, - workspaceModel: { id: "ws.id", ownerId: "ws.ownerId" }, + workspaceModel: { + id: "ws.id", + ownerId: "ws.ownerId", + tenantId: "ws.tenantId", + }, })) - const { MacRepository } = await import( "../src/repositories/postgres/mac.repository" ) @@ -119,10 +133,10 @@ const { MacRepository } = await import( function makeClient(): DatabaseClient { return { insert: vi.fn(makeChain), + select: vi.fn(makeChain), update: vi.fn(makeChain), } as unknown as DatabaseClient } - function incrementCounts(builder: ReturnType): unknown[] { return builder.mock.results.flatMap((result) => { const chain = result.value as QueryChain @@ -168,7 +182,10 @@ beforeEach(() => { gte.mockClear() gt.mockClear() inArray.mockClear() + isNull.mockClear() lte.mockClear() + or.mockClear() + sum.mockClear() }) describe("MacRepository — empty-input guards", () => { @@ -210,6 +227,20 @@ describe("MacRepository — ensureWorkspaceMac", () => { expect(map.size).toBe(1) }) + test("stamps ownership from the workspace row", async () => { + const client = makeClient() + queueResult([{ id: "wm-99", workspaceId: "ws-1", periodStart, periodEnd }]) + + await repo.ensureWorkspaceMac( + [{ workspaceId: "ws-1", periodStart, periodEnd }], + client, + ) + + const chain = (client.insert as ReturnType).mock.results[0] + ?.value as QueryChain + expect(chain.select).toHaveBeenCalledTimes(1) + }) + test("distinct entries issue one insert each and map every key", async () => { const client = makeClient() queueResult([{ id: "wm-1", workspaceId: "ws-1", periodStart, periodEnd }]) @@ -416,19 +447,6 @@ describe("MacRepository — addWorkspaceMacCount", () => { }) }) -describe("MacRepository — reconcilePeriod", () => { - test("rebuilds WorkspaceMac count from ContactActiveMonthly", async () => { - queueResult([]) - - await repo.reconcilePeriod({ - workspaceId: "ws-1", - periodStart: "2026-05-01T00:00:00.000Z", - }) - - expect(dbUpdate).toHaveBeenCalledTimes(1) - }) -}) - describe("MacRepository — getActiveContactCountByWorkspaceId", () => { test("returns macCount and ISO period bounds from the row", async () => { queueResult([ @@ -461,46 +479,6 @@ describe("MacRepository — getActiveContactCountByWorkspaceId", () => { }) }) -describe("countActiveContactsForOwner", () => { - test("counts only the current anchored period for a resetting plan", async () => { - queueResult([{ value: 7 }]) - const repo = new MacRepository() - - const result = await repo.countActiveContactsForOwner({ - ownerId: "owner-1", - billingPeriodStart: new Date("2026-06-01T00:00:00.000Z"), - cumulative: false, - }) - - expect(result).toBe(7) - }) - - test("returns 0 for a period-less owner without querying", async () => { - const repo = new MacRepository() - - const result = await repo.countActiveContactsForOwner({ - ownerId: "owner-1", - billingPeriodStart: null, - cumulative: false, - }) - - expect(result).toBe(0) - }) - - test("counts every period for a lifetime (cumulative) plan", async () => { - queueResult([{ value: 25 }]) - const repo = new MacRepository() - - const result = await repo.countActiveContactsForOwner({ - ownerId: "owner-1", - billingPeriodStart: new Date("2026-06-01T00:00:00.000Z"), - cumulative: true, - }) - - expect(result).toBe(25) - }) -}) - describe("MacRepository — countActiveContactsByWorkspace", () => { test("counts distinct hourly contacts in the requested range", async () => { const from = new Date("2026-05-10T00:00:00.000Z") diff --git a/packages/analytics/src/repositories/postgres/mac.repository.ts b/packages/analytics/src/repositories/postgres/mac.repository.ts index 670bae7e9d..833e0df384 100644 --- a/packages/analytics/src/repositories/postgres/mac.repository.ts +++ b/packages/analytics/src/repositories/postgres/mac.repository.ts @@ -1,6 +1,5 @@ import { and, - count, countDistinct, type DatabaseClient, db, @@ -22,7 +21,6 @@ import { workspaceModel, } from "@chatbotx.io/database/schema" import { logger } from "../../lib/logger" -import { anchoredPeriod } from "../../lib/mac-period" import { type AnalyticsFilter, normalizeAnalyticsFilters, @@ -94,18 +92,29 @@ export class MacRepository { for (const entry of entries) { const [row] = await client .insert(workspaceMacModel) - .values({ - workspaceId: entry.workspaceId, - periodStart: entry.periodStart, - periodEnd: entry.periodEnd, - }) + .select( + client + .select({ + workspaceId: workspaceModel.id, + ownerId: workspaceModel.ownerId, + tenantId: workspaceModel.tenantId, + periodStart: sql`${entry.periodStart}`.as("periodStart"), + periodEnd: sql`${entry.periodEnd}`.as("periodEnd"), + }) + .from(workspaceModel) + .where(eq(workspaceModel.id, entry.workspaceId)), + ) .onConflictDoUpdate({ target: [ workspaceMacModel.workspaceId, workspaceMacModel.periodStart, workspaceMacModel.periodEnd, ], - set: { updatedAt: sql`now()` }, + set: { + ownerId: sql`COALESCE(${workspaceMacModel.ownerId}, EXCLUDED."ownerId")`, + tenantId: sql`COALESCE(${workspaceMacModel.tenantId}, EXCLUDED."tenantId")`, + updatedAt: sql`now()`, + }, }) .returning({ id: workspaceMacModel.id, @@ -294,51 +303,6 @@ export class MacRepository { return new Map(rows.map((row) => [row.workspaceId, Number(row.macCount)])) } - /** - * The owner's monthly-active-contacts count, read from the durable - * `ContactActiveMonthly` ledger across every workspace they own. This is the - * authoritative source for `UserQuota.macUsed`: every MAC increment (webchat, - * worker, import, message tracking) writes a presence row in the same - * transaction as the live-counter bump, so the ledger never under-counts. - * - * - `cumulative: false` (resetting plans) counts only the period containing - * now, anchored to `billingPeriodStart` — the standard "this month" MAC. - * - `cumulative: true` (lifetime plans, which never reset) counts every - * period, matching the live counter that lifetime plans accumulate. - * - * Returns 0 when there is no billing anchor (period-less owners are not - * MAC-tracked). - */ - async countActiveContactsForOwner( - input: { - ownerId: string - billingPeriodStart: Date | null - cumulative: boolean - }, - client: DatabaseClient = db, - ): Promise { - const conditions = [eq(workspaceModel.ownerId, input.ownerId)] - - if (!input.cumulative) { - if (!input.billingPeriodStart) { - return 0 - } - const { start } = anchoredPeriod(new Date(), input.billingPeriodStart) - conditions.push(eq(contactActiveMonthlyModel.periodStart, start)) - } - - const [row] = await client - .select({ value: count() }) - .from(contactActiveMonthlyModel) - .innerJoin( - workspaceModel, - eq(contactActiveMonthlyModel.workspaceId, workspaceModel.id), - ) - .where(and(...conditions)) - - return row ? Number(row.value) : 0 - } - async countActiveContactsByWorkspace( input: { workspaceId: string; from: Date; to: Date } & AnalyticsFilter, client: DatabaseClient = db, @@ -377,36 +341,6 @@ export class MacRepository { return row ? Number(row.value) : 0 } - async reconcilePeriod( - input: { workspaceId: string; periodStart: string }, - client: DatabaseClient = db, - ): Promise { - const periodStart = new Date(input.periodStart) - - const activeContactCount = client - .select({ count: sql`count(*)::int` }) - .from(contactActiveMonthlyModel) - .where( - and( - eq(contactActiveMonthlyModel.workspaceId, input.workspaceId), - eq(contactActiveMonthlyModel.periodStart, periodStart), - ), - ) - - await client - .update(workspaceMacModel) - .set({ - macCount: sql`(${activeContactCount})`, - updatedAt: sql`now()`, - }) - .where( - and( - eq(workspaceMacModel.workspaceId, input.workspaceId), - eq(workspaceMacModel.periodStart, periodStart), - ), - ) - } - /** * Which of `contactInboxIds` have a `ContactActiveMonthly` presence row for * `periodStart` — i.e. are MAC-active this billing period. Used to decide diff --git a/packages/analytics/src/schemas/mac.ts b/packages/analytics/src/schemas/mac.ts index eea90265e3..25b95dd319 100644 --- a/packages/analytics/src/schemas/mac.ts +++ b/packages/analytics/src/schemas/mac.ts @@ -54,9 +54,3 @@ export const macMessageInPayloadSchema = z.object({ sourceId: z.string().nullish(), }) export type MacMessageInPayload = z.infer - -export const reconcilePeriodInputSchema = z.object({ - workspaceId: z.string(), - periodStart: z.string(), -}) -export type ReconcilePeriodInput = z.infer diff --git a/packages/analytics/src/services/mac-analytics.service.ts b/packages/analytics/src/services/mac-analytics.service.ts index a27b8999e3..da490ee8ce 100644 --- a/packages/analytics/src/services/mac-analytics.service.ts +++ b/packages/analytics/src/services/mac-analytics.service.ts @@ -1,10 +1,8 @@ -import { db } from "@chatbotx.io/database/client" import { distributedStore } from "@chatbotx.io/redis" import { logger } from "../lib/logger" import { calcEndOfDayTtl, workspaceMacCacheKey } from "../lib/mac-period" import { macRepository } from "../repositories/postgres/mac.repository" import type { AnalyticsFilter } from "../schemas/common" -import type { ReconcilePeriodInput } from "../schemas/mac" async function readOrPopulate( cacheKey: string, @@ -66,10 +64,6 @@ export class MacAnalyticsService { }): Promise> { return macRepository.getActiveContactInboxIds(input) } - - reconcilePeriod(input: ReconcilePeriodInput): Promise { - return db.transaction((tx) => macRepository.reconcilePeriod(input, tx)) - } } export const macAnalyticsService = new MacAnalyticsService() diff --git a/packages/business/__tests__/campaign-cleanup.test.ts b/packages/business/__tests__/campaign-cleanup.test.ts index 95e21b1b75..bf42c46c89 100644 --- a/packages/business/__tests__/campaign-cleanup.test.ts +++ b/packages/business/__tests__/campaign-cleanup.test.ts @@ -4,18 +4,25 @@ const updateReturningMock = vi.fn() const updateWhereMock = vi.fn() const updateSetMock = vi.fn() const updateMock = vi.fn() +const executeMock = vi.fn() +const completeActiveEnrollmentBatchMock = vi.fn() vi.mock("@chatbotx.io/database/client", () => ({ and: (...conditions: unknown[]) => ({ __and: conditions }), db: { - update: (...args: unknown[]) => updateMock(...args), + execute: (...args: unknown[]) => executeMock(...args), transaction: async (run: (tx: unknown) => Promise) => await run({ update: (...args: unknown[]) => updateMock(...args) }), + update: (...args: unknown[]) => updateMock(...args), }, eq: (column: unknown, value: unknown) => ({ __eq: [column, value] }), inArray: (column: unknown, value: unknown) => ({ __inArray: [column, value], }), + sql: (strings: TemplateStringsArray, ...values: unknown[]) => ({ + strings, + values, + }), })) vi.mock("@chatbotx.io/database/partials", () => ({ @@ -41,10 +48,11 @@ vi.mock("@chatbotx.io/database/schema", () => ({ status: { __column: "broadcast.status" }, workspaceId: { __column: "broadcast.workspaceId" }, }, - contactsOnSequenceModel: { - id: { __column: "contactsOnSequence.id" }, - status: { __column: "contactsOnSequence.status" }, - workspaceId: { __column: "contactsOnSequence.workspaceId" }, +})) + +vi.mock("@chatbotx.io/database/repositories/sequence", () => ({ + sequenceRepository: { + completeActiveEnrollmentBatch: completeActiveEnrollmentBatchMock, }, })) @@ -54,6 +62,8 @@ beforeEach(() => { updateWhereMock.mockReturnValue({ returning: updateReturningMock }) updateSetMock.mockReturnValue({ where: updateWhereMock }) updateMock.mockReturnValue({ set: updateSetMock }) + executeMock.mockResolvedValue({ rowCount: 1 }) + completeActiveEnrollmentBatchMock.mockResolvedValue(1) }) test("cancelInFlightBroadcastsForWorkspace cancels scheduled, sending and recurring broadcasts only, stopping their series first", async () => { @@ -100,42 +110,21 @@ test("cancelInFlightBroadcastsForWorkspace cancels scheduled, sending and recurr ) }) -test("completeActiveSequenceEnrollmentsForWorkspace marks active enrollments completed", async () => { - const { completeActiveSequenceEnrollmentsForWorkspace } = await import( +test("completeActiveSequenceEnrollmentBatch delegates one bounded batch to the repository", async () => { + const { completeActiveSequenceEnrollmentBatch } = await import( "../src/workspace-lifecycle/campaign-cleanup" ) + const tx = {} as never - const completedCount = await completeActiveSequenceEnrollmentsForWorkspace({ - workspaceId: "workspace-1", - }) - - expect(completedCount).toBe(1) - expect(updateMock).toHaveBeenCalledOnce() - expect(updateSetMock).toHaveBeenCalledWith( - expect.objectContaining({ - status: "completed", - nextRunAt: null, - nextStepId: null, - }), - ) - expect(updateWhereMock).toHaveBeenCalledWith( - expect.objectContaining({ - __and: expect.arrayContaining([ - expect.objectContaining({ - __eq: [ - expect.objectContaining({ - __column: "contactsOnSequence.workspaceId", - }), - "workspace-1", - ], - }), - expect.objectContaining({ - __eq: [ - expect.objectContaining({ __column: "contactsOnSequence.status" }), - "active", - ], - }), - ]), + await expect( + completeActiveSequenceEnrollmentBatch({ + tx, + workspaceId: "workspace-1", }), + ).resolves.toBe(1) + + expect(completeActiveEnrollmentBatchMock).toHaveBeenCalledWith( + { limit: 500, workspaceId: "workspace-1" }, + tx, ) }) diff --git a/packages/business/__tests__/edge-safe-import-graph.test.ts b/packages/business/__tests__/edge-safe-import-graph.test.ts index 79b2b7d664..10403ccee1 100644 --- a/packages/business/__tests__/edge-safe-import-graph.test.ts +++ b/packages/business/__tests__/edge-safe-import-graph.test.ts @@ -192,15 +192,14 @@ describe("@chatbotx.io/business barrel stays Edge-Runtime safe", () => { expect(report).toBe("") }) - test("freezeWorkspaceRuntime keeps cancelling dispatches through a crypto-free module", () => { - // Guards the fix's intent, not just its absence of symptoms: the freeze path - // must still reach the real cancel + Redis-removal helpers. + test("freezeWorkspaceRuntime cancels batches through a crypto-free module", () => { + // The database batch commits before Redis scheduler removal. const service = readFileSync( join(BUSINESS_SRC, "workspace-lifecycle/service.ts"), "utf8", ) - expect(service).toContain("cancelPendingDispatchesForWorkspace") + expect(service).toContain("cancelPendingDispatchBatch") expect(service).toContain("removeDispatchesFromSchedule") expect(service).not.toMatch(SCHEDULER_BARREL_IMPORT) }) diff --git a/packages/business/__tests__/live-counter-store-consume.test.ts b/packages/business/__tests__/live-counter-store-consume.test.ts index f117473473..c502126acc 100644 --- a/packages/business/__tests__/live-counter-store-consume.test.ts +++ b/packages/business/__tests__/live-counter-store-consume.test.ts @@ -45,8 +45,10 @@ vi.mock("@chatbotx.io/database/client", () => ({ inArray: vi.fn((column: unknown, values: unknown) => ({ inArray: [column, values], })), + isNull: vi.fn(), lte: vi.fn(), ne: vi.fn(), + or: vi.fn(), sql: Object.assign( vi.fn(() => ({ sql: true })), { raw: vi.fn() }, @@ -415,8 +417,6 @@ describe("userQuotaService.reconcileOwnerPoolUsage", () => { "2", "channels", "0", - "mac", - "0", ) }) }) diff --git a/packages/business/__tests__/user-quota-reconcile-self.test.ts b/packages/business/__tests__/user-quota-reconcile-self.test.ts index d144247afb..9bfc61272f 100644 --- a/packages/business/__tests__/user-quota-reconcile-self.test.ts +++ b/packages/business/__tests__/user-quota-reconcile-self.test.ts @@ -2,7 +2,7 @@ import { beforeEach, describe, expect, test, vi } from "vitest" // --------------------------------------------------------------------------- // userQuotaService — the non-reseller self-reconcile surface moved from -// sync-user-quota.ts: reconcileUserSelfUsage, persistMacUsed, +// sync-user-quota.ts: reconcileUserSelfUsage, raiseMacUsed, // applyMonthlyBotMessagesReset. AGENTS.md invariants 11/12: counts are // assigned directly (never GREATEST); onConflictDoUpdate upserts must never // become plain inserts. Mirrors the mock scaffolding in @@ -15,8 +15,12 @@ const { countDistinctTeamMembersForOwner, findFirstUserQuota, hset, + eval: redisEval, + tenantFindById, + tenantFindByOwner, userQuotaModel, countResults, + sumForTenant, } = vi.hoisted(() => { const userQuotaModel = { userId: "userId-column", @@ -58,8 +62,12 @@ const { monthlyBotMessagesPeriodStart: new Date("2026-01-01T00:00:00Z"), })), hset: vi.fn(async () => undefined), + eval: vi.fn(async () => 1), + tenantFindById: vi.fn(async () => undefined), + tenantFindByOwner: vi.fn(async () => undefined), userQuotaModel, countResults, + sumForTenant: vi.fn(async () => 0), } }) @@ -67,7 +75,9 @@ vi.mock("@chatbotx.io/database/client", () => ({ db: { insert: dbInsert, select: dbSelect, - query: { userQuotaModel: { findFirst: findFirstUserQuota } }, + query: { + userQuotaModel: { findFirst: findFirstUserQuota }, + }, }, and: (...args: unknown[]) => ({ and: args }), count: vi.fn(() => "count()"), @@ -97,15 +107,20 @@ vi.mock("@chatbotx.io/database/schema", () => ({ status: "connection.status", }, contactModel: { workspaceId: "contact.workspaceId" }, + tenantModel: { ownerId: "tenant.ownerId" }, userQuotaModel, workspaceMacModel: {}, workspaceMemberModel: {}, - workspaceModel: { id: "workspace.id", ownerId: "workspace.ownerId" }, + workspaceModel: { + id: "workspace.id", + ownerId: "workspace.ownerId", + tenantId: "workspace.tenantId", + }, })) vi.mock("@chatbotx.io/redis", () => ({ cacheConnections: { - useExisting: vi.fn(async () => ({ hset })), + useExisting: vi.fn(async () => ({ eval: redisEval, hset })), }, distributedStore: { get: vi.fn(async () => null), @@ -117,24 +132,120 @@ vi.mock("@chatbotx.io/redis", () => ({ vi.mock("../src/keys", () => ({ isCloud: vi.fn(() => true) })) vi.mock("../src/logger", () => ({ logger: { warn: vi.fn(), error: vi.fn() } })) +vi.mock("@chatbotx.io/database/repositories/tenant", () => ({ + tenantRepository: { + findById: tenantFindById, + findByOwner: tenantFindByOwner, + }, +})) + +vi.mock("@chatbotx.io/database/repositories/workspace-mac", () => ({ + workspaceMacRepository: { sumForTenant }, +})) const { userQuotaService } = await import("../src/user-quota/service") beforeEach(() => { vi.clearAllMocks() - countResults.length = 0 - countDistinctTeamMembersForOwner.mockResolvedValue(2) findFirstUserQuota.mockResolvedValue({ macUsed: 10, periodStart: new Date("2026-01-01T00:00:00Z"), periodEnd: new Date("2026-02-01T00:00:00Z"), monthlyBotMessagesPeriodStart: new Date("2026-01-01T00:00:00Z"), }) + tenantFindById.mockResolvedValue(undefined) + tenantFindByOwner.mockResolvedValue(undefined) + sumForTenant.mockResolvedValue(0) vi.spyOn( userQuotaService, "countDistinctTeamMembersForOwner", ).mockImplementation(countDistinctTeamMembersForOwner) }) +describe("reconcileOwnerAfterTeardown", () => { + test("reconciles a root owner against only the owner's self usage", async () => { + const selfUsage = vi + .spyOn(userQuotaService, "reconcileUserSelfUsage") + .mockResolvedValue({ + channelsUsed: 0, + contactsUsed: 0, + macUsed: 0, + teamMembersUsed: 0, + workspacesUsed: 0, + }) + tenantFindByOwner.mockResolvedValueOnce(undefined) + const ownerPool = vi.spyOn(userQuotaService, "reconcileOwnerPoolUsage") + + await userQuotaService.reconcileOwnerAfterTeardown("owner-1") + + expect(selfUsage).toHaveBeenCalledWith("owner-1") + expect(ownerPool).not.toHaveBeenCalled() + }) + + test("reconciles an active reseller owner against the tenant pool", async () => { + const selfUsage = vi.spyOn(userQuotaService, "reconcileUserSelfUsage") + const ownerPool = vi + .spyOn(userQuotaService, "reconcileOwnerPoolUsage") + .mockResolvedValue(undefined) + tenantFindByOwner.mockResolvedValueOnce({ + id: "tenant-1", + ownerId: "owner-1", + status: "active", + }) + + await userQuotaService.reconcileOwnerAfterTeardown("owner-1") + + expect(ownerPool).toHaveBeenCalledWith("owner-1", "tenant-1") + expect(selfUsage).toHaveBeenCalledWith("owner-1") + }) + + test("uses the reseller tenant rather than the root tenant for root-owned workspaces", async () => { + const ownerPool = vi + .spyOn(userQuotaService, "reconcileOwnerPoolUsage") + .mockResolvedValue(undefined) + tenantFindByOwner.mockResolvedValueOnce({ + id: "reseller-tenant", + ownerId: "reseller-owner", + status: "active", + }) + + await userQuotaService.reconcileOwnerAfterTeardown("reseller-owner", "1") + + expect(ownerPool).toHaveBeenCalledWith("reseller-owner", "reseller-tenant") + }) +}) + +describe("reconcileOwnerPoolUsage", () => { + test("does not restore MAC after a quota rollover races the reconcile", async () => { + await userQuotaService.reconcileOwnerPoolUsage("owner-1", "tenant-1") + + const builder = dbInsert.mock.results.at(-1)?.value + const conflict = builder?.onConflictDoUpdate.mock.calls[0]?.[0] as { + set: { macUsed: { sql: string } } + } + expect(conflict.set.macUsed.sql).toContain("WHEN ? IS NOT DISTINCT FROM ?") + expect(conflict.set.macUsed.sql).toContain("ELSE ?") + }) + + test("delegates a period-mismatched live MAC raise to the atomic Redis guard", async () => { + redisEval.mockResolvedValueOnce(0) + + await userQuotaService.raiseLiveMac({ + userId: "owner-1", + value: 17, + periodIso: "2026-02-01T00:00:00.000Z", + }) + + expect(redisEval).toHaveBeenCalledWith( + expect.any(String), + 1, + expect.any(String), + "macPeriodStart", + "2026-02-01T00:00:00.000Z", + "mac", + "17", + ) + }) +}) describe("reconcileUserSelfUsage", () => { test("assigns counts directly (not GREATEST) via onConflictDoUpdate", async () => { @@ -270,22 +381,29 @@ describe("reconcileUserSelfUsage", () => { }) }) -describe("persistMacUsed", () => { - test("upserts macUsed to the given absolute value via onConflictDoUpdate", async () => { - await userQuotaService.persistMacUsed("user-1", 42) +describe("raiseMacUsed", () => { + test("upserts a period-pinned monotonic MAC value", async () => { + const periodStart = new Date("2026-01-01T00:00:00Z") + await userQuotaService.raiseMacUsed({ + userId: "user-1", + value: 42, + periodStart, + }) const call = dbInsert.mock.results.at(-1)?.value as { values: ReturnType onConflictDoUpdate: ReturnType } expect(call.values).toHaveBeenCalledWith( - expect.objectContaining({ userId: "user-1", macUsed: 42 }), - ) - expect(call.onConflictDoUpdate).toHaveBeenCalledWith( expect.objectContaining({ - set: expect.objectContaining({ macUsed: 42 }), + macUsed: 42, + periodStart, + userId: "user-1", }), ) + expect(call.onConflictDoUpdate).toHaveBeenCalledWith( + expect.objectContaining({ setWhere: expect.anything() }), + ) }) }) diff --git a/packages/business/__tests__/workspace-bot-message-usage.test.ts b/packages/business/__tests__/workspace-bot-message-usage.test.ts new file mode 100644 index 0000000000..2931892975 --- /dev/null +++ b/packages/business/__tests__/workspace-bot-message-usage.test.ts @@ -0,0 +1,52 @@ +import { beforeEach, describe, expect, test, vi } from "vitest" + +const mocks = vi.hoisted(() => ({ + getForUser: vi.fn(), + increment: vi.fn(), +})) + +vi.mock( + "@chatbotx.io/database/repositories/workspace-bot-message-usage", + () => ({ + workspaceBotMessageUsageRepository: { increment: mocks.increment }, + }), +) + +vi.mock("../src/user-quota/service", () => ({ + userQuotaService: { getForUser: mocks.getForUser }, +})) + +const { workspaceBotMessageUsageService } = await import( + "../src/workspace-bot-message-usage/service" +) + +describe("WorkspaceBotMessageUsageService.increment", () => { + beforeEach(() => { + vi.clearAllMocks() + mocks.getForUser.mockResolvedValue({ + periodStart: new Date("2026-07-01T00:00:00.000Z"), + }) + mocks.increment.mockResolvedValue(undefined) + }) + + test("uses the worker-resolved workspace ownership without querying workspace again", async () => { + await workspaceBotMessageUsageService.increment({ + count: 3, + ownerId: "owner-1", + tenantId: "tenant-1", + workspaceId: "workspace-1", + }) + + expect(mocks.getForUser).toHaveBeenCalledWith("owner-1") + expect(mocks.increment).toHaveBeenCalledWith( + expect.objectContaining({ + count: 3, + ownerId: "owner-1", + periodEnd: expect.any(Date), + periodStart: expect.any(Date), + tenantId: "tenant-1", + workspaceId: "workspace-1", + }), + ) + }) +}) diff --git a/packages/business/__tests__/workspace-deletion-record.test.ts b/packages/business/__tests__/workspace-deletion-record.test.ts new file mode 100644 index 0000000000..6b38653817 --- /dev/null +++ b/packages/business/__tests__/workspace-deletion-record.test.ts @@ -0,0 +1,39 @@ +import { + workspaceDeletionRecordDetailsSchema, + workspaceDeletionRecordUsageSnapshotSchema, +} from "@chatbotx.io/database/schema" +import { describe, expect, test } from "vitest" + +describe("workspace deletion record schemas", () => { + test("round-trips ISO timestamps stored in JSON evidence", () => { + const periodStart = "2026-10-01T00:00:00.000Z" + const periodEnd = "2026-11-01T00:00:00.000Z" + expect( + workspaceDeletionRecordUsageSnapshotSchema.parse({ + botMessages: [], + channels: 0, + contacts: 0, + mac: [{ count: 1, periodStart, periodEnd }], + ownerQuota: null, + teamMembers: 0, + }).mac[0]?.periodStart, + ).toBe(periodStart) + expect( + workspaceDeletionRecordDetailsSchema.parse({ + channels: [], + members: [], + owner: { email: null, id: "1", name: null, tenantId: null }, + plan: null, + requestedBy: null, + workspace: { + createdAt: periodStart, + id: "1", + language: "en", + logo: null, + name: "A", + timezone: "UTC", + }, + }).workspace.createdAt, + ).toBe(periodStart) + }) +}) diff --git a/packages/business/__tests__/workspace-lifecycle.service.test.ts b/packages/business/__tests__/workspace-lifecycle.service.test.ts index e98273fa82..d9fda1c37f 100644 --- a/packages/business/__tests__/workspace-lifecycle.service.test.ts +++ b/packages/business/__tests__/workspace-lifecycle.service.test.ts @@ -3,8 +3,8 @@ import { beforeEach, expect, test, vi } from "vitest" const order: string[] = [] const transactionMock = vi.fn() const cancelInFlightBroadcastsForWorkspaceMock = vi.fn() -const completeActiveSequenceEnrollmentsForWorkspaceMock = vi.fn() -const cancelPendingDispatchesForWorkspaceMock = vi.fn() +const completeActiveSequenceEnrollmentBatchMock = vi.fn() +const cancelPendingDispatchBatchMock = vi.fn() const removeDispatchesFromScheduleMock = vi.fn() const cancelSmartDelaysForWorkspaceMock = vi.fn() const loggerWarnMock = vi.fn() @@ -15,20 +15,29 @@ const connectionTransitionMock = vi.fn() vi.mock("@chatbotx.io/database/client", () => ({ eq: vi.fn((column: unknown, value: unknown) => ({ eq: [column, value] })), + sql: Object.assign((strings: TemplateStringsArray) => ({ strings }), { + raw: vi.fn((value: string) => value), + }), db: { transaction: transactionMock, }, })) vi.mock("@chatbotx.io/sequence-scheduler/dispatch-cancel", () => ({ - cancelPendingDispatchesForWorkspace: cancelPendingDispatchesForWorkspaceMock, + cancelPendingDispatchBatch: cancelPendingDispatchBatchMock, removeDispatchesFromSchedule: removeDispatchesFromScheduleMock, + WORKSPACE_DISPATCH_CANCEL_BATCH_SIZE: 500, })) vi.mock("@chatbotx.io/database/repositories", () => ({ connectionRepository: { findByInboxId: findByInboxIdMock }, + HEAVY_WORKSPACE_TABLES: [], LIVE_RUN_STATUSES: [], + NO_FK_WORKSPACE_TABLES: [], + PARTITIONED_WORKSPACE_TABLES: [], PULL_CLAIMABLE_STATUSES: [], + WORKSPACE_ANALYTICS_HYPERTABLES: [], + workspacePurgeRepository: {}, })) vi.mock("../src/connection/state-service", () => ({ @@ -42,8 +51,9 @@ vi.mock("../src/base.service", () => ({ vi.mock("../src/workspace-lifecycle/campaign-cleanup", () => ({ cancelInFlightBroadcastsForWorkspace: cancelInFlightBroadcastsForWorkspaceMock, - completeActiveSequenceEnrollmentsForWorkspace: - completeActiveSequenceEnrollmentsForWorkspaceMock, + completeActiveSequenceEnrollmentBatch: + completeActiveSequenceEnrollmentBatchMock, + SEQUENCE_ENROLLMENT_CANCEL_BATCH_SIZE: 500, })) vi.mock("../src/workspace-lifecycle/smart-delay-cleanup", () => ({ @@ -76,7 +86,9 @@ beforeEach(() => { order.length = 0 transactionMock.mockImplementation( async (callback: (tx: unknown) => Promise) => { - const result = await callback({}) + const result = await callback({ + execute: vi.fn().mockResolvedValue({ rowCount: 0 }), + }) order.push("tx-done") return result }, @@ -85,13 +97,13 @@ beforeEach(() => { order.push("broadcast") return Promise.resolve(2) }) - completeActiveSequenceEnrollmentsForWorkspaceMock.mockImplementation(() => { + completeActiveSequenceEnrollmentBatchMock.mockImplementation(() => { order.push("enrollments") return Promise.resolve(3) }) - cancelPendingDispatchesForWorkspaceMock.mockImplementation(() => { + cancelPendingDispatchBatchMock.mockImplementation(() => { order.push("dispatches") - return Promise.resolve([{ id: "dispatch-1", bucket: 1 }]) + return Promise.resolve([{ bucket: 1, id: "dispatch-1" }]) }) removeDispatchesFromScheduleMock.mockImplementation(() => { order.push("remove") @@ -107,7 +119,7 @@ beforeEach(() => { connectionTransitionMock.mockResolvedValue(undefined) }) -test("freezeWorkspaceRuntime runs cleanup in one transaction and removes Redis entries after commit", { +test("freezeWorkspaceRuntime keeps the transaction to broadcasts and drains independent runtime sources after commit", { timeout: 60_000, }, async () => { // service.ts pulls in a dozen+ unmocked integration services (Klaviyo, @@ -119,33 +131,38 @@ test("freezeWorkspaceRuntime runs cleanup in one transaction and removes Redis e "../src/workspace-lifecycle/service" ) - await workspaceLifecycleService.freezeWorkspaceRuntime("workspace-1") + await workspaceLifecycleService.freezeWorkspaceRuntime( + "workspace-1", + Date.now() + 60_000, + ) - expect(transactionMock).toHaveBeenCalledOnce() - expect(cancelInFlightBroadcastsForWorkspaceMock).toHaveBeenCalledWith({ - tx: {}, - workspaceId: "workspace-1", - }) - expect( - completeActiveSequenceEnrollmentsForWorkspaceMock, - ).toHaveBeenCalledWith({ - tx: {}, - workspaceId: "workspace-1", - }) - expect(cancelPendingDispatchesForWorkspaceMock).toHaveBeenCalledWith({ - client: {}, - removeFromSchedule: false, - workspaceId: "workspace-1", - }) + expect(transactionMock).toHaveBeenCalledTimes(3) + expect(cancelInFlightBroadcastsForWorkspaceMock).toHaveBeenCalledWith( + expect.objectContaining({ + workspaceId: "workspace-1", + }), + ) + expect(completeActiveSequenceEnrollmentBatchMock).toHaveBeenCalledWith( + expect.objectContaining({ + workspaceId: "workspace-1", + }), + ) + expect(cancelPendingDispatchBatchMock).toHaveBeenCalledWith( + expect.objectContaining({ + workspaceId: "workspace-1", + }), + ) expect(removeDispatchesFromScheduleMock).toHaveBeenCalledWith([ - { id: "dispatch-1", bucket: 1 }, + { bucket: 1, id: "dispatch-1" }, ]) - expect(cancelSmartDelaysForWorkspaceMock).toHaveBeenCalledWith({ - workspaceId: "workspace-1", - }) + expect(cancelSmartDelaysForWorkspaceMock).toHaveBeenCalledWith( + expect.objectContaining({ workspaceId: "workspace-1" }), + ) expect(order).toEqual([ "broadcast", + "tx-done", "enrollments", + "tx-done", "dispatches", "tx-done", "remove", @@ -154,8 +171,6 @@ test("freezeWorkspaceRuntime runs cleanup in one transaction and removes Redis e }) test("freezeWorkspaceRuntime still cancels smart delays when dispatch cleanup fails", async () => { - // Broadcasts/sequences and wait steps are independent runtime sources: a - // Redis failure on one must not leave the other armed. removeDispatchesFromScheduleMock.mockRejectedValueOnce( new Error("redis down"), ) @@ -164,27 +179,31 @@ test("freezeWorkspaceRuntime still cancels smart delays when dispatch cleanup fa "../src/workspace-lifecycle/service" ) - await workspaceLifecycleService.freezeWorkspaceRuntime("workspace-1") + await workspaceLifecycleService.freezeWorkspaceRuntime( + "workspace-1", + Date.now() + 60_000, + ) expect(loggerWarnMock).toHaveBeenCalledOnce() - expect(cancelSmartDelaysForWorkspaceMock).toHaveBeenCalledWith({ - workspaceId: "workspace-1", - }) + expect(cancelSmartDelaysForWorkspaceMock).toHaveBeenCalledWith( + expect.objectContaining({ workspaceId: "workspace-1" }), + ) }) -test("freezeWorkspaceRuntime does not throw when smart-delay cancellation fails", async () => { - cancelSmartDelaysForWorkspaceMock.mockRejectedValueOnce( - new Error("redis down"), - ) +test("freezeWorkspaceRuntime defers when smart-delay cancellation fails", async () => { + const error = new Error("redis down") + cancelSmartDelaysForWorkspaceMock.mockRejectedValueOnce(error) const { workspaceLifecycleService } = await import( "../src/workspace-lifecycle/service" ) await expect( - workspaceLifecycleService.freezeWorkspaceRuntime("workspace-1"), - ).resolves.toBeUndefined() - expect(loggerWarnMock).toHaveBeenCalledOnce() + workspaceLifecycleService.freezeWorkspaceRuntime( + "workspace-1", + Date.now() + 60_000, + ), + ).rejects.toBe(error) }) test("disconnectWorkspaceChannels tears down active native Instagram coexist runs", async () => { diff --git a/packages/business/__tests__/workspace-lifecycle.smart-delay-cleanup.test.ts b/packages/business/__tests__/workspace-lifecycle.smart-delay-cleanup.test.ts index b3c973f873..3e14308df0 100644 --- a/packages/business/__tests__/workspace-lifecycle.smart-delay-cleanup.test.ts +++ b/packages/business/__tests__/workspace-lifecycle.smart-delay-cleanup.test.ts @@ -3,22 +3,34 @@ import { beforeEach, describe, expect, test, vi } from "vitest" const cancelActiveForWorkspace = vi.fn() const queueRemove = vi.fn() const loggerWarn = vi.fn() +const transaction = vi.fn((callback: (tx: unknown) => unknown) => + callback({ execute: vi.fn() }), +) vi.mock("@chatbotx.io/worker-config", () => ({ integrationQueue: { remove: queueRemove }, })) - vi.mock("../src/logger", () => ({ logger: { error: vi.fn(), info: vi.fn(), warn: loggerWarn }, })) - vi.mock("../src/smart-delay/service", () => ({ smartDelayService: { cancelActiveForWorkspace }, })) +vi.mock("@chatbotx.io/database/client", () => ({ + db: { transaction }, + sql: Object.assign( + vi.fn(() => ({})), + { raw: vi.fn(() => "") }, + ), +})) const { cancelSmartDelaysForWorkspace, SMART_DELAY_CANCEL_BATCH_SIZE } = await import("../src/workspace-lifecycle/smart-delay-cleanup") +const props = () => ({ + deadlineAt: Date.now() + 60_000, + workspaceId: "workspace-1", +}) const rowsOfSize = (size: number, offset = 0) => Array.from({ length: size }, (_, index) => ({ id: `row-${offset + index}`, @@ -34,9 +46,7 @@ describe("cancelSmartDelaysForWorkspace", () => { test("cancels nothing and touches no queue when the workspace has no live rows", async () => { cancelActiveForWorkspace.mockResolvedValueOnce([]) - await expect( - cancelSmartDelaysForWorkspace({ workspaceId: "workspace-1" }), - ).resolves.toBe(0) + await expect(cancelSmartDelaysForWorkspace(props())).resolves.toBe(0) expect(cancelActiveForWorkspace).toHaveBeenCalledOnce() expect(queueRemove).not.toHaveBeenCalled() @@ -47,9 +57,7 @@ describe("cancelSmartDelaysForWorkspace", () => { { id: "row-1", triggerAt: new Date("2026-07-16T00:01:00.000Z") }, ]) - await expect( - cancelSmartDelaysForWorkspace({ workspaceId: "workspace-1" }), - ).resolves.toBe(1) + await expect(cancelSmartDelaysForWorkspace(props())).resolves.toBe(1) expect(queueRemove).toHaveBeenCalledWith( `smart-delay-row-1-${new Date("2026-07-16T00:01:00.000Z").getTime()}`, @@ -61,13 +69,14 @@ describe("cancelSmartDelaysForWorkspace", () => { .mockResolvedValueOnce(rowsOfSize(SMART_DELAY_CANCEL_BATCH_SIZE)) .mockResolvedValueOnce(rowsOfSize(3, SMART_DELAY_CANCEL_BATCH_SIZE)) - await expect( - cancelSmartDelaysForWorkspace({ workspaceId: "workspace-1" }), - ).resolves.toBe(SMART_DELAY_CANCEL_BATCH_SIZE + 3) + await expect(cancelSmartDelaysForWorkspace(props())).resolves.toBe( + SMART_DELAY_CANCEL_BATCH_SIZE + 3, + ) expect(cancelActiveForWorkspace).toHaveBeenCalledTimes(2) expect(cancelActiveForWorkspace).toHaveBeenLastCalledWith({ limit: SMART_DELAY_CANCEL_BATCH_SIZE, + tx: expect.anything(), workspaceId: "workspace-1", }) }) @@ -78,10 +87,7 @@ describe("cancelSmartDelaysForWorkspace", () => { ]) queueRemove.mockRejectedValueOnce(new Error("redis down")) - // The row is already canceled, so a surviving job is a no-op when it wakes: - // removal is cleanup, never correctness. - await expect( - cancelSmartDelaysForWorkspace({ workspaceId: "workspace-1" }), - ).resolves.toBe(1) + await expect(cancelSmartDelaysForWorkspace(props())).resolves.toBe(1) + expect(loggerWarn).toHaveBeenCalledOnce() }) }) diff --git a/packages/business/src/index.ts b/packages/business/src/index.ts index 549f9a3ec4..4d7a6287e5 100644 --- a/packages/business/src/index.ts +++ b/packages/business/src/index.ts @@ -171,6 +171,8 @@ export * from "./whatsapp-message-template" export * from "./working-hours" export * from "./workspace" export * from "./workspace-api-token" +export * from "./workspace-bot-message-usage" +export * from "./workspace-deletion-record" export * from "./workspace-lifecycle" export * from "./workspace-lifecycle/with-blocked-owner-guard" export * from "./workspace-member" diff --git a/packages/business/src/leaderboard/purge.ts b/packages/business/src/leaderboard/purge.ts index 772fce7306..09731b1ab2 100644 --- a/packages/business/src/leaderboard/purge.ts +++ b/packages/business/src/leaderboard/purge.ts @@ -4,6 +4,7 @@ import { } from "@chatbotx.io/database/repositories" import { leaderboardStore } from "@chatbotx.io/redis" import { logger } from "../logger" +import { drainInBatches } from "../workspace-lifecycle/purge-batch" /** * Workspace hard-delete: participants/audit rows cascade with the Leaderboard @@ -14,10 +15,13 @@ import { logger } from "../logger" */ export async function purgeLeaderboardDataForWorkspace( workspaceId: string, - options: { batchSize?: number; maxBatches?: number } = {}, -): Promise<{ deleted: number; complete: boolean }> { + options: { + batchSize?: number + deadlineAt?: number + maxBatches?: number + } = {}, +): Promise { const batchSize = options.batchSize ?? 5000 - const maxBatches = options.maxBatches ?? 2000 const live = await leaderboardRepository.findLiveForWorkspace(workspaceId) for (const leaderboard of live) { await leaderboardStore.drop(leaderboard.id).catch((err) => { @@ -27,16 +31,20 @@ export async function purgeLeaderboardDataForWorkspace( ) }) } - let deleted = 0 - for (let batch = 0; batch < maxBatches; batch++) { - const count = await leaderboardScoreEventRepository.deleteBatchByWorkspace({ - workspaceId, - limit: batchSize, - }) - deleted += count - if (count < batchSize) { - return { deleted, complete: true } - } - } - return { deleted, complete: false } + + return await drainInBatches({ + batchSize, + deadlineAt: options.deadlineAt ?? Number.MAX_SAFE_INTEGER, + maxBatches: options.maxBatches ?? 2000, + runBatch: async (tx) => { + const count = + await leaderboardScoreEventRepository.deleteBatchByWorkspace( + { limit: batchSize, workspaceId }, + tx, + ) + return { count, value: undefined } + }, + table: "LeaderboardScoreEvent", + workspaceId, + }) } diff --git a/packages/business/src/smart-delay/service.ts b/packages/business/src/smart-delay/service.ts index 50ae40ab76..cb35ea3349 100644 --- a/packages/business/src/smart-delay/service.ts +++ b/packages/business/src/smart-delay/service.ts @@ -476,7 +476,6 @@ class SmartDelayService extends BaseService { ]), ), ) - .orderBy(contactOnSmartDelayModel.triggerAt) .limit(limit) .for("update", { skipLocked: true }) diff --git a/packages/business/src/user-quota/service.ts b/packages/business/src/user-quota/service.ts index 603981af6d..988be586ab 100644 --- a/packages/business/src/user-quota/service.ts +++ b/packages/business/src/user-quota/service.ts @@ -4,23 +4,21 @@ import { countDistinct, db, eq, - gt, inArray, - lte, type SQL, sql, - sum, } from "@chatbotx.io/database/client" import { ACTIVE_CONNECTION_STATUSES, planStatuses, } from "@chatbotx.io/database/partials" +import { tenantRepository } from "@chatbotx.io/database/repositories/tenant" +import { workspaceMacRepository } from "@chatbotx.io/database/repositories/workspace-mac" import { connectionModel, contactModel, ROOT_TENANT_ID, userQuotaModel, - workspaceMacModel, workspaceMemberModel, workspaceModel, } from "@chatbotx.io/database/schema" @@ -64,6 +62,22 @@ const BOOTSTRAP_TRIAL_FALLBACK = { monthlyBotMessagesLimit: 0, } as const +const RAISE_LIVE_MAC_LUA = ` +local storedPeriod = redis.call("HGET", KEYS[1], ARGV[1]) +if storedPeriod ~= ARGV[2] then + return 0 +end + +local currentValue = tonumber(redis.call("HGET", KEYS[1], ARGV[3])) +local nextValue = tonumber(ARGV[4]) +if not currentValue or nextValue > currentValue then + redis.call("HSET", KEYS[1], ARGV[3], ARGV[4]) + return 1 +end + +return 0 +` + interface DefaultPlanSnapshot { botMessagesLimit: number | null channelsLimit: number | null @@ -837,35 +851,24 @@ class UserQuotaService extends BaseService { tenantId: string, ): Promise { const client = await cacheConnections.useExisting() + // Read before calculating the ledger sum. The guarded upsert below then + // leaves a row the quota worker rolled over unchanged. + const ownerQuota = await db.query.userQuotaModel.findFirst({ + where: { userId: ownerId }, + columns: { periodStart: true }, + }) + const periodStart = ownerQuota?.periodStart ?? null const [ { contactsUsed, workspacesUsed, channelsUsed }, teamMembersUsed, - [macResult], + macUsed, ] = await Promise.all([ this.countWorkspaceScopedUsage(eq(workspaceModel.tenantId, tenantId)), - this.countDistinctTeamMembers({ tenantId }), - - db - .select({ total: sum(workspaceMacModel.macCount) }) - .from(workspaceMacModel) - .innerJoin( - workspaceModel, - eq(workspaceMacModel.workspaceId, workspaceModel.id), - ) - .where( - and( - eq(workspaceModel.tenantId, tenantId), - lte(workspaceMacModel.periodStart, sql`now()`), - gt(workspaceMacModel.periodEnd, sql`now()`), - ), - ), + workspaceMacRepository.sumForTenant(tenantId), ]) - // `sum()` returns a numeric string (or null when no rows match). - const macUsed = Number(macResult?.total ?? 0) - await db .insert(userQuotaModel) .values({ @@ -875,30 +878,26 @@ class UserQuotaService extends BaseService { workspacesUsed, channelsUsed, macUsed, + periodStart, syncedAt: new Date(), }) .onConflictDoUpdate({ target: userQuotaModel.userId, set: { - // Authoritative current counts — assigned directly, NOT GREATEST — so - // deletions across the pool free quota. Only `*Used` is touched; the - // owner's limits / plan identity are written by the billing layer. contactsUsed, teamMembersUsed, workspacesUsed, channelsUsed, - macUsed, + macUsed: sql`CASE + WHEN ${userQuotaModel.periodStart} IS NOT DISTINCT FROM ${periodStart} + THEN GREATEST(${userQuotaModel.macUsed}, ${macUsed}) + ELSE ${userQuotaModel.macUsed} + END`, syncedAt: new Date(), updatedAt: sql`CURRENT_TIMESTAMP`, }, }) - // Mirror the live counters to the same authoritative current counts. - // `macPeriodStart` is intentionally not written here: the DB query already - // filters for the current billing period (`periodStart ≤ now() < periodEnd`), - // so `macUsed` is period-correct without the stamp. Period resets are owned - // by the private quota-worker, which advances `periodStart` and zeroes - // `macUsed`; the next reconcile will pick up the new value from DB. await client.hset( this.store.liveKey(ownerId), "contacts", @@ -909,12 +908,36 @@ class UserQuotaService extends BaseService { String(workspacesUsed), "channels", String(channelsUsed), - "mac", - String(macUsed), ) + if (periodStart) { + await this.raiseLiveMac({ + userId: ownerId, + value: macUsed, + periodIso: periodStart.toISOString(), + }) + } await this.store.invalidate(ownerId) } + /** + * Reconciles the quota row that owns a workspace teardown. Active reseller + * tenants pool usage on their owner; platform users reconcile only their own + * workspaces. + */ + async reconcileOwnerAfterTeardown( + ownerId: string, + tenantId?: string, + ): Promise { + await this.reconcileUserSelfUsage(ownerId) + + const tenant = + tenantId && tenantId !== ROOT_TENANT_ID + ? await tenantRepository.findById(tenantId) + : await tenantRepository.findByOwner(ownerId) + if (tenant?.status === "active" && tenant.ownerId) { + await this.reconcileOwnerPoolUsage(tenant.ownerId, tenant.id) + } + } /** * Pure read of a metric's configured limit + DB-synced used value from a @@ -968,7 +991,7 @@ class UserQuotaService extends BaseService { * shape, same "assigned directly, NOT GREATEST" semantics so deletions * free quota). Unlike the pool path, the live-counter `hset` here has NO * `mac` field — mac is reconciled separately by the caller via - * `persistMacUsed`/the ledger reconcile, using the markers this method + * `raiseMacUsed`/the ledger reconcile, using the markers this method * returns from one round-trip (`macUsed`, `periodStart`, `periodEnd`, * `monthlyBotMessagesPeriodStart`). */ @@ -1045,20 +1068,55 @@ class UserQuotaService extends BaseService { } } - /** `sync-user-quota.ts` persistMacUsed: upsert `UserQuota.macUsed` to an absolute value. */ - async persistMacUsed(userId: string, value: number): Promise { + /** + * Raises `macUsed` without ever overwriting a concurrent billing rollover. + * The conflict predicate pins the update to the caller's billing period. + */ + async raiseMacUsed(input: { + userId: string + value: number + periodStart: Date + }): Promise { await db .insert(userQuotaModel) - .values({ userId, macUsed: value, syncedAt: new Date() }) + .values({ + userId: input.userId, + macUsed: input.value, + periodStart: input.periodStart, + syncedAt: new Date(), + }) .onConflictDoUpdate({ target: userQuotaModel.userId, + setWhere: sql`${userQuotaModel.periodStart} IS NOT DISTINCT FROM ${input.periodStart}`, set: { - macUsed: value, + macUsed: sql`GREATEST(${userQuotaModel.macUsed}, ${input.value})`, updatedAt: sql`CURRENT_TIMESTAMP`, }, }) } + /** + * Raises the live MAC counter only when it still belongs to the quota period + * read by the caller. Lua keeps the period check and monotonic write atomic, + * so an increment cannot be lost between a separate HGET and HSET. + */ + async raiseLiveMac(input: { + userId: string + value: number + periodIso: string + }): Promise { + const client = await cacheConnections.useExisting() + await client.eval( + RAISE_LIVE_MAC_LUA, + 1, + this.store.liveKey(input.userId), + "macPeriodStart", + input.periodIso, + "mac", + String(input.value), + ) + } + /** * `sync-user-quota.ts` reconcileMonthlyBotMessages: applies the resolved * reset/stamp decision. The `reset` branch zeroes `monthlyBotMessagesUsed` diff --git a/packages/business/src/workspace-bot-message-usage/index.ts b/packages/business/src/workspace-bot-message-usage/index.ts new file mode 100644 index 0000000000..9376fea807 --- /dev/null +++ b/packages/business/src/workspace-bot-message-usage/index.ts @@ -0,0 +1 @@ +export * from "./service" diff --git a/packages/business/src/workspace-bot-message-usage/service.ts b/packages/business/src/workspace-bot-message-usage/service.ts new file mode 100644 index 0000000000..be3e721860 --- /dev/null +++ b/packages/business/src/workspace-bot-message-usage/service.ts @@ -0,0 +1,37 @@ +import { anchoredPeriod } from "@chatbotx.io/analytics" +import { workspaceBotMessageUsageRepository } from "@chatbotx.io/database/repositories/workspace-bot-message-usage" +import { BaseService } from "../base.service" +import { userQuotaService } from "../user-quota/service" + +const calendarPeriod = (now: Date) => { + const start = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), 1)) + const end = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth() + 1, 1)) + return { start, end } +} + +class WorkspaceBotMessageUsageService extends BaseService { + async increment(input: { + count: number + ownerId: string + tenantId: string + workspaceId: string + }): Promise { + const quota = await userQuotaService.getForUser(input.ownerId) + const now = new Date() + const period = quota?.periodStart + ? anchoredPeriod(now, quota.periodStart) + : calendarPeriod(now) + + await workspaceBotMessageUsageRepository.increment({ + count: input.count, + ownerId: input.ownerId, + periodEnd: period.end, + periodStart: period.start, + tenantId: input.tenantId, + workspaceId: input.workspaceId, + }) + } +} + +export const workspaceBotMessageUsageService = + new WorkspaceBotMessageUsageService() diff --git a/packages/business/src/workspace-deletion-record/index.ts b/packages/business/src/workspace-deletion-record/index.ts new file mode 100644 index 0000000000..9376fea807 --- /dev/null +++ b/packages/business/src/workspace-deletion-record/index.ts @@ -0,0 +1 @@ +export * from "./service" diff --git a/packages/business/src/workspace-deletion-record/service.ts b/packages/business/src/workspace-deletion-record/service.ts new file mode 100644 index 0000000000..f4aea12433 --- /dev/null +++ b/packages/business/src/workspace-deletion-record/service.ts @@ -0,0 +1,165 @@ +import type { DatabaseClient } from "@chatbotx.io/database/client" +import { workspaceDeletionRecordRepository } from "@chatbotx.io/database/repositories/workspace-deletion-record" +import { + type WorkspaceDeletionRecordUsageSnapshot, + workspaceDeletionRecordDetailsSchema, + workspaceDeletionRecordUsageSnapshotSchema, +} from "@chatbotx.io/database/schema" +import { BaseService } from "../base.service" + +const toIso = (value: Date): string => value.toISOString() + +class WorkspaceDeletionRecordService extends BaseService { + async recordForWorkspace(input: { + workspace: { id: string; ownerId: string; tenantId: string } + tx?: DatabaseClient + }): Promise< + | { created: boolean; usageSnapshot: WorkspaceDeletionRecordUsageSnapshot } + | undefined + > { + const sources = await workspaceDeletionRecordRepository.readSnapshotSources( + { + ownerId: input.workspace.ownerId, + workspaceId: input.workspace.id, + }, + input.tx, + ) + if (!sources) { + return + } + + const usageSnapshot = workspaceDeletionRecordUsageSnapshotSchema.parse({ + botMessages: sources.botMessages.map((usage) => ({ + count: usage.count, + periodEnd: toIso(usage.periodEnd), + periodStart: toIso(usage.periodStart), + })), + channels: sources.inboxes.length, + contacts: sources.contacts, + mac: sources.mac.map((usage) => ({ + count: usage.count, + periodEnd: toIso(usage.periodEnd), + periodStart: toIso(usage.periodStart), + })), + ownerQuota: sources.quota + ? { + botMessagesUsed: sources.quota.botMessagesUsed, + macUsed: sources.quota.macUsed, + monthlyBotMessagesUsed: sources.quota.monthlyBotMessagesUsed, + periodEnd: sources.quota.periodEnd + ? toIso(sources.quota.periodEnd) + : null, + periodStart: sources.quota.periodStart + ? toIso(sources.quota.periodStart) + : null, + planName: sources.quota.planName, + planStatus: sources.quota.planStatus, + } + : null, + teamMembers: sources.members.length, + }) + const details = workspaceDeletionRecordDetailsSchema.parse({ + channels: sources.inboxes, + members: sources.members, + owner: sources.owner + ? { ...sources.owner, id: input.workspace.ownerId } + : { + email: null, + id: input.workspace.ownerId, + name: null, + tenantId: null, + }, + plan: sources.quota + ? { + periodEnd: sources.quota.periodEnd + ? toIso(sources.quota.periodEnd) + : null, + periodStart: sources.quota.periodStart + ? toIso(sources.quota.periodStart) + : null, + planName: sources.quota.planName, + planStatus: sources.quota.planStatus, + } + : null, + requestedBy: sources.requestedBy + ? { + ...sources.requestedBy, + id: sources.workspace.deletionRequestedById, + via: "ui" as const, + } + : null, + workspace: { + createdAt: toIso(sources.workspace.createdAt), + id: sources.workspace.id, + language: sources.workspace.language, + logo: sources.workspace.logo, + name: sources.workspace.name, + timezone: sources.workspace.timezone, + }, + }) + const created = await workspaceDeletionRecordRepository.insertIfAbsent( + { + deletionRequestedAt: sources.workspace.deletionRequestedAt, + deletionRequestedByEmail: sources.requestedBy?.email ?? null, + deletionRequestedById: sources.workspace.deletionRequestedById, + details, + ownerEmail: sources.owner?.email ?? null, + ownerId: input.workspace.ownerId, + scheduledDeletionAt: sources.workspace.scheduledDeletionAt, + tenantId: input.workspace.tenantId, + usageSnapshot, + workspaceId: input.workspace.id, + workspaceName: sources.workspace.name, + }, + input.tx, + ) + return { created, usageSnapshot } + } + + async markPurged(input: { + workspaceId: string + tx?: DatabaseClient + }): Promise { + await workspaceDeletionRecordRepository.markPurged( + input.workspaceId, + input.tx, + ) + } + + async listForOwner(input: { + ownerId: string + page: number + perPage: number + }) { + const result = await workspaceDeletionRecordRepository.listForOwner({ + ownerId: input.ownerId, + limit: input.perPage, + offset: (input.page - 1) * input.perPage, + }) + return { + data: result.data, + pageCount: Math.ceil(result.total / input.perPage), + } + } + + async listForAdmin(input: { + page: number + perPage: number + search?: string + tenantId?: string + }) { + const result = await workspaceDeletionRecordRepository.listForAdmin({ + limit: input.perPage, + offset: (input.page - 1) * input.perPage, + search: input.search, + tenantId: input.tenantId, + }) + return { + data: result.data, + pageCount: Math.ceil(result.total / input.perPage), + } + } +} + +export const workspaceDeletionRecordService = + new WorkspaceDeletionRecordService() diff --git a/packages/business/src/workspace-lifecycle/__tests__/purge-batch.test.ts b/packages/business/src/workspace-lifecycle/__tests__/purge-batch.test.ts new file mode 100644 index 0000000000..699bd1e326 --- /dev/null +++ b/packages/business/src/workspace-lifecycle/__tests__/purge-batch.test.ts @@ -0,0 +1,85 @@ +import { beforeEach, describe, expect, test, vi } from "vitest" +import { WorkspacePurgeIncompleteError } from "../../errors" + +const { mockExecute, mockTransaction } = vi.hoisted(() => { + const execute = vi.fn() + return { + mockExecute: execute, + mockTransaction: vi.fn((callback: (tx: unknown) => unknown) => + callback({ execute }), + ), + } +}) + +vi.mock("@chatbotx.io/database/client", () => ({ + db: { transaction: mockTransaction }, + sql: Object.assign( + vi.fn(() => ({})), + { raw: vi.fn(() => "") }, + ), +})) +vi.mock("../../logger", () => ({ logger: { info: vi.fn() } })) + +const { drainInBatches, withPurgeTimeouts } = await import("../purge-batch") + +const props = { + batchSize: 2, + deadlineAt: Date.now() + 60_000, + maxBatches: 2, + table: "Example", + workspaceId: "workspace-1", +} + +describe("purge batch helpers", () => { + beforeEach(() => { + vi.clearAllMocks() + mockExecute.mockResolvedValue(undefined) + }) + + test("throws incomplete before starting a batch when the deadline has elapsed", async () => { + await expect( + drainInBatches({ + ...props, + deadlineAt: Date.now(), + runBatch: vi.fn(), + }), + ).rejects.toBeInstanceOf(WorkspacePurgeIncompleteError) + }) + + test("throws incomplete when every permitted batch is full", async () => { + await expect( + drainInBatches({ + ...props, + runBatch: async () => ({ count: 2, value: undefined }), + }), + ).rejects.toBeInstanceOf(WorkspacePurgeIncompleteError) + }) + + test.each([ + "55P03", + "57014", + ])("maps PostgreSQL %s timeout errors to incomplete", async (code) => { + mockTransaction.mockRejectedValueOnce({ code }) + + await expect( + withPurgeTimeouts({ + fn: async () => undefined, + table: "Example", + workspaceId: "workspace-1", + }), + ).rejects.toBeInstanceOf(WorkspacePurgeIncompleteError) + }) + + test("rethrows non-timeout failures", async () => { + const error = new Error("database unavailable") + mockTransaction.mockRejectedValueOnce(error) + + await expect( + withPurgeTimeouts({ + fn: async () => undefined, + table: "Example", + workspaceId: "workspace-1", + }), + ).rejects.toBe(error) + }) +}) diff --git a/packages/business/src/workspace-lifecycle/__tests__/service.test.ts b/packages/business/src/workspace-lifecycle/__tests__/service.test.ts index d4abfa5ee5..44f2dd0c9d 100644 --- a/packages/business/src/workspace-lifecycle/__tests__/service.test.ts +++ b/packages/business/src/workspace-lifecycle/__tests__/service.test.ts @@ -2,77 +2,75 @@ import { beforeEach, describe, expect, test, vi } from "vitest" import { WorkspacePurgeIncompleteError } from "../../errors" const { - mockDbExecute, - mockSelectDistinctLimit, - mockTransaction, - mockTxDelete, - mockDeleteWhere, - mockLiftDecompressionLimit, + mockConnectionTransition, + mockFindByInboxId, + mockHasPartitionedWorkspaceRows, + mockHasWorkspaceRows, + mockListMessageConversationPage, mockListWithIntegrationsByWorkspace, mockInboxDisconnect, - mockFindByInboxId, - mockConnectionTransition, - mockSql, + mockDeleteMessagesAndAttachments, + mockDeletePartitionedBatch, + mockDeleteWorkspaceRowsBatch, + mockTransaction, } = vi.hoisted(() => { - const sql = Object.assign( - vi.fn(() => ({})), - { - raw: vi.fn((value: string) => value), - }, - ) - - const deleteWhere = vi.fn() - const txDelete = vi.fn(() => ({ where: deleteWhere })) - const selectDistinctLimit = vi.fn() - + const execute = vi.fn() return { - mockDbExecute: vi.fn(), - mockSelectDistinctLimit: selectDistinctLimit, + mockConnectionTransition: vi.fn(), + mockDeleteMessagesAndAttachments: vi.fn(), + mockDeletePartitionedBatch: vi.fn(), + mockDeleteWorkspaceRowsBatch: vi.fn(), + mockFindByInboxId: vi.fn(), + mockHasPartitionedWorkspaceRows: vi.fn(), + mockHasWorkspaceRows: vi.fn(), + mockInboxDisconnect: vi.fn().mockResolvedValue(undefined), + mockListMessageConversationPage: vi.fn(), + mockListWithIntegrationsByWorkspace: vi.fn(), mockTransaction: vi.fn((callback: (tx: unknown) => unknown) => - callback({ delete: txDelete }), + callback({ execute }), ), - mockTxDelete: txDelete, - mockDeleteWhere: deleteWhere, - mockLiftDecompressionLimit: vi.fn().mockResolvedValue(undefined), - mockListWithIntegrationsByWorkspace: vi.fn(), - mockInboxDisconnect: vi.fn().mockResolvedValue(undefined), - mockFindByInboxId: vi.fn().mockResolvedValue(undefined), - mockConnectionTransition: vi.fn(), - mockSql: sql, } }) -const selectDistinctChain = { - from: () => selectDistinctChain, - where: () => selectDistinctChain, - orderBy: () => selectDistinctChain, - limit: mockSelectDistinctLimit, -} - vi.mock("../../leaderboard/purge", () => ({ - purgeLeaderboardDataForWorkspace: vi.fn(async () => ({ - deleted: 0, - complete: true, - })), + purgeLeaderboardDataForWorkspace: vi.fn().mockResolvedValue(0), })) vi.mock("@chatbotx.io/database/client", () => ({ - db: { - execute: mockDbExecute, - selectDistinct: () => selectDistinctChain, - transaction: mockTransaction, - }, - sql: mockSql, + db: { transaction: mockTransaction }, + sql: Object.assign( + vi.fn(() => ({})), + { raw: vi.fn(() => "") }, + ), and: vi.fn(), eq: vi.fn(), inArray: vi.fn(), - liftDecompressionLimit: mockLiftDecompressionLimit, })) vi.mock("@chatbotx.io/database/repositories", () => ({ connectionRepository: { findByInboxId: mockFindByInboxId }, + HEAVY_WORKSPACE_TABLES: ["ErrorLog"], LIVE_RUN_STATUSES: [], + NO_FK_WORKSPACE_TABLES: [], + PARTITIONED_WORKSPACE_TABLES: [ + { + primaryKey: ["broadcastId", "contactId"], + selector: "broadcastWorkspace", + table: "ContactOnBroadcast", + }, + ], PULL_CLAIMABLE_STATUSES: [], + WORKSPACE_ANALYTICS_HYPERTABLES: ["AnalyticsContactEvent"], + workspacePurgeRepository: { + deleteAnalyticsSlice: vi.fn(), + deleteMessagesAndAttachments: mockDeleteMessagesAndAttachments, + deletePartitionedBatch: mockDeletePartitionedBatch, + deleteWorkspaceRowsBatch: mockDeleteWorkspaceRowsBatch, + findNextAnalyticsRowAt: vi.fn().mockResolvedValue(null), + hasPartitionedWorkspaceRows: mockHasPartitionedWorkspaceRows, + hasWorkspaceRows: mockHasWorkspaceRows, + listMessageConversationPage: mockListMessageConversationPage, + }, })) vi.mock("../../connection/state-service", () => ({ @@ -88,110 +86,66 @@ vi.mock("../../inbox/service", () => ({ const { workspaceLifecycleService } = await import("../service") -// `HEAVY_WORKSPACE_TABLES` holds 6 non-hypertable tables; Message/Attachment are -// drained separately by the hypertable pass and are not in the ctid loop. -const HEAVY_TABLE_COUNT = 7 -const MAX_BATCHES_PER_TABLE = 2000 +const deadlineAt = () => Date.now() + 60_000 describe("workspaceLifecycleService", () => { beforeEach(() => { vi.clearAllMocks() - mockInboxDisconnect.mockResolvedValue(undefined) - mockFindByInboxId.mockResolvedValue(undefined) mockConnectionTransition.mockResolvedValue(undefined) - // Default: no hypertable rows, so purgeWorkspaceHeavyData exercises only the - // ctid loop unless a test opts in. - mockSelectDistinctLimit.mockResolvedValue([]) - mockDeleteWhere.mockResolvedValue({ rowCount: 0 }) - mockLiftDecompressionLimit.mockResolvedValue(undefined) - mockDbExecute.mockResolvedValue({ rowCount: 0, rows: [] }) - }) - - test("purgeWorkspaceHeavyData drains each ctid table until a short batch", async () => { - // First batch is full (keep draining), then a short batch stops that table. - mockDbExecute - .mockResolvedValueOnce({ rowCount: 2 }) - .mockResolvedValue({ rowCount: 1, rows: [] }) - - const result = await workspaceLifecycleService.purgeWorkspaceHeavyData({ - workspaceId: "workspace-1", - batchSize: 2, - }) - - // Table 1: 2 + 1 rows (2 calls); tables 2..7: 1 row each (1 call). - expect(result).toBe(2 + 1 + (HEAVY_TABLE_COUNT - 1)) - expect(mockDbExecute).toHaveBeenCalledTimes( - 2 + (HEAVY_TABLE_COUNT - 1) + HEAVY_TABLE_COUNT, - ) + mockDeleteMessagesAndAttachments.mockResolvedValue(0) + mockDeletePartitionedBatch.mockResolvedValue(0) + mockDeleteWorkspaceRowsBatch.mockResolvedValue(0) + mockFindByInboxId.mockResolvedValue(undefined) + mockHasPartitionedWorkspaceRows.mockResolvedValue(false) + mockHasWorkspaceRows.mockResolvedValue(false) + mockInboxDisconnect.mockResolvedValue(undefined) + mockListMessageConversationPage.mockResolvedValue([]) + mockListWithIntegrationsByWorkspace.mockResolvedValue([]) }) - test("purgeWorkspaceHeavyData caps batches per ctid table", async () => { - vi.spyOn(globalThis, "setTimeout").mockImplementation((callback) => { - callback() - return 0 as unknown as ReturnType - }) - mockDbExecute.mockResolvedValue({ rowCount: 1, rows: [] }) + test("drains each registered direct workspace table once when batches are short", async () => { + mockDeleteWorkspaceRowsBatch.mockResolvedValue(1) - const result = await workspaceLifecycleService.purgeWorkspaceHeavyData({ - workspaceId: "workspace-1", - batchSize: 1, - }) + await expect( + workspaceLifecycleService.purgeWorkspaceHeavyData({ + batchSize: 2, + deadlineAt: deadlineAt(), + workspaceId: "workspace-1", + }), + ).resolves.toBe(1) - expect(result).toBe(HEAVY_TABLE_COUNT * MAX_BATCHES_PER_TABLE) - expect(mockDbExecute).toHaveBeenCalledTimes( - HEAVY_TABLE_COUNT * MAX_BATCHES_PER_TABLE + HEAVY_TABLE_COUNT, - ) - vi.restoreAllMocks() + expect(mockDeletePartitionedBatch).toHaveBeenCalledOnce() + expect(mockDeleteWorkspaceRowsBatch).toHaveBeenCalledOnce() }) - test("signals an incomplete drain when a capped table still has rows", async () => { - vi.spyOn(globalThis, "setTimeout").mockImplementation((callback) => { - callback() - return 0 as unknown as ReturnType - }) - mockDbExecute.mockResolvedValue({ rowCount: 1, rows: [{}] }) + test("defers a partitioned table when a SKIP LOCKED drain leaves rows behind", async () => { + mockHasPartitionedWorkspaceRows.mockResolvedValue(true) await expect( workspaceLifecycleService.purgeWorkspaceHeavyData({ + batchSize: 2, + deadlineAt: deadlineAt(), workspaceId: "workspace-1", - batchSize: 1, }), ).rejects.toBeInstanceOf(WorkspacePurgeIncompleteError) - - vi.restoreAllMocks() }) - test("purgeWorkspaceHeavyData drains hypertable rows by conversation with the decompression limit lifted", async () => { - vi.spyOn(globalThis, "setTimeout").mockImplementation((callback) => { - callback() - return 0 as unknown as ReturnType - }) - // ctid loop deletes nothing (short first batch → immediate break per table). - mockDbExecute.mockResolvedValue({ rowCount: 0, rows: [] }) - // Message pass: one page of two conversations, then empty. Attachment pass: - // empty. - mockSelectDistinctLimit - .mockResolvedValueOnce([ - { conversationId: "conv-1" }, - { conversationId: "conv-2" }, - ]) + test("counts rows deleted from a message hypertable page", async () => { + mockListMessageConversationPage + .mockResolvedValueOnce(["conversation-1"]) .mockResolvedValue([]) - mockDeleteWhere.mockResolvedValue({ rowCount: 3 }) + mockDeleteMessagesAndAttachments.mockResolvedValue(3) - const result = await workspaceLifecycleService.purgeWorkspaceHeavyData({ - workspaceId: "workspace-1", - batchSize: 5000, - }) + await expect( + workspaceLifecycleService.purgeWorkspaceHeavyData({ + batchSize: 2, + deadlineAt: deadlineAt(), + workspaceId: "workspace-1", + }), + ).resolves.toBe(3) - // One page → one transaction that lifts the cap once and deletes from both - // Message and Attachment (rowCount 3 each = 6). ctid loop adds 0. - expect(result).toBe(6) - expect(mockTransaction).toHaveBeenCalledOnce() - expect(mockLiftDecompressionLimit).toHaveBeenCalledOnce() - expect(mockTxDelete).toHaveBeenCalledTimes(2) - vi.restoreAllMocks() + expect(mockDeleteMessagesAndAttachments).toHaveBeenCalledOnce() }) - test("disconnectWorkspaceChannels disconnects provider auth and marks the inbox disconnected", async () => { const disconnect = vi.fn().mockResolvedValue(undefined) mockListWithIntegrationsByWorkspace.mockResolvedValue([ diff --git a/packages/business/src/workspace-lifecycle/campaign-cleanup.ts b/packages/business/src/workspace-lifecycle/campaign-cleanup.ts index 9f3a2c81f8..f771752e69 100644 --- a/packages/business/src/workspace-lifecycle/campaign-cleanup.ts +++ b/packages/business/src/workspace-lifecycle/campaign-cleanup.ts @@ -6,10 +6,8 @@ import { inArray, } from "@chatbotx.io/database/client" import { broadcastStatuses } from "@chatbotx.io/database/partials" -import { - broadcastModel, - contactsOnSequenceModel, -} from "@chatbotx.io/database/schema" +import { sequenceRepository } from "@chatbotx.io/database/repositories/sequence" +import { broadcastModel } from "@chatbotx.io/database/schema" import { disarmAllSeriesForWorkspace } from "../broadcast/recurrence-ledger" export async function cancelInFlightBroadcastsForWorkspace(props: { @@ -48,28 +46,17 @@ export async function cancelInFlightBroadcastsForWorkspace(props: { return cancelledBroadcasts.length } -export async function completeActiveSequenceEnrollmentsForWorkspace(props: { - tx?: DatabaseClient +export const SEQUENCE_ENROLLMENT_CANCEL_BATCH_SIZE = 500 + +export async function completeActiveSequenceEnrollmentBatch(props: { + tx: DatabaseClient workspaceId: string }): Promise { - const { tx = db, workspaceId } = props - - const completedEnrollments = await tx - .update(contactsOnSequenceModel) - .set({ - status: "completed", - completedAt: new Date(), - nextRunAt: null, - nextStepId: null, - updatedAt: new Date(), - }) - .where( - and( - eq(contactsOnSequenceModel.workspaceId, workspaceId), - eq(contactsOnSequenceModel.status, "active"), - ), - ) - .returning({ id: contactsOnSequenceModel.id }) - - return completedEnrollments.length + return await sequenceRepository.completeActiveEnrollmentBatch( + { + limit: SEQUENCE_ENROLLMENT_CANCEL_BATCH_SIZE, + workspaceId: props.workspaceId, + }, + props.tx, + ) } diff --git a/packages/business/src/workspace-lifecycle/purge-batch.ts b/packages/business/src/workspace-lifecycle/purge-batch.ts new file mode 100644 index 0000000000..bc622016ec --- /dev/null +++ b/packages/business/src/workspace-lifecycle/purge-batch.ts @@ -0,0 +1,103 @@ +import { type DatabaseClient, db, sql } from "@chatbotx.io/database/client" +import { WorkspacePurgeIncompleteError } from "../errors" +import { logger } from "../logger" + +const PURGE_LOCK_TIMEOUT = "2s" +const PURGE_STATEMENT_TIMEOUT = "30s" + +const getPostgresErrorCode = (value: unknown): unknown => { + if (typeof value !== "object" || value === null || !("code" in value)) { + return + } + return value.code +} + +export const isPurgeTimeoutError = (err: unknown): boolean => { + const code = + getPostgresErrorCode(err) ?? + getPostgresErrorCode(err instanceof Error ? err.cause : undefined) + return code === "55P03" || code === "57014" +} + +export const pause = (ms: number): Promise => { + const { promise, resolve } = Promise.withResolvers() + setTimeout(resolve, ms) + return promise +} + +export const assertPurgeDeadline = ( + deadlineAt: number, + workspaceId: string, + table: string, +): void => { + if (Date.now() >= deadlineAt) { + throw new WorkspacePurgeIncompleteError(workspaceId, table) + } +} + +export const withPurgeTimeouts = async (props: { + fn: (tx: DatabaseClient) => Promise + rethrowTimeout?: boolean + table: string + workspaceId: string +}): Promise => { + try { + return await db.transaction(async (tx) => { + await tx.execute( + sql`SET LOCAL lock_timeout = ${sql.raw(`'${PURGE_LOCK_TIMEOUT}'`)}`, + ) + await tx.execute( + sql`SET LOCAL statement_timeout = ${sql.raw(`'${PURGE_STATEMENT_TIMEOUT}'`)}`, + ) + return await props.fn(tx) + }) + } catch (err) { + if (!isPurgeTimeoutError(err) || props.rethrowTimeout) { + throw err + } + logger.info( + { table: props.table, workspaceId: props.workspaceId }, + "workspace-purge: timed out, deferring to next run", + ) + throw new WorkspacePurgeIncompleteError(props.workspaceId, props.table) + } +} + +type BatchResult = { + count: number + value: T +} + +export const drainInBatches = async (props: { + afterBatch?: (value: T) => Promise + batchSize: number + deadlineAt: number + maxBatches: number + runBatch: (tx: DatabaseClient) => Promise> + table: string + workspaceId: string +}): Promise => { + let total = 0 + + for (let batch = 0; batch < props.maxBatches; batch += 1) { + assertPurgeDeadline(props.deadlineAt, props.workspaceId, props.table) + const result = await withPurgeTimeouts({ + fn: props.runBatch, + table: props.table, + workspaceId: props.workspaceId, + }) + total += result.count + + if (result.count === 0) { + return total + } + + await props.afterBatch?.(result.value) + + if (result.count < props.batchSize) { + return total + } + } + + throw new WorkspacePurgeIncompleteError(props.workspaceId, props.table) +} diff --git a/packages/business/src/workspace-lifecycle/service.ts b/packages/business/src/workspace-lifecycle/service.ts index f4581fbfa6..aebba07010 100644 --- a/packages/business/src/workspace-lifecycle/service.ts +++ b/packages/business/src/workspace-lifecycle/service.ts @@ -4,21 +4,22 @@ import { db, eq, inArray, - liftDecompressionLimit, - sql, } from "@chatbotx.io/database/client" import { channelTypes, type InboxDisconnectReason, - ROOT_TENANT_ID, } from "@chatbotx.io/database/partials" import { connectionRepository, + HEAVY_WORKSPACE_TABLES, LIVE_RUN_STATUSES, + NO_FK_WORKSPACE_TABLES, + PARTITIONED_WORKSPACE_TABLES, PULL_CLAIMABLE_STATUSES, + WORKSPACE_ANALYTICS_HYPERTABLES, + workspacePurgeRepository, } from "@chatbotx.io/database/repositories" import { - attachmentModel, coexistSyncRunModel, integrationInstagramModel, integrationMessengerModel, @@ -29,7 +30,6 @@ import { integrationWebchatModel, integrationWhatsappModel, integrationZaloModel, - messageModel, tagChannelModel, whatsappCoexistStagingModel, } from "@chatbotx.io/database/schema" @@ -39,8 +39,9 @@ import type { InboxWithIntegrations } from "@chatbotx.io/database/types" // Edge bundle (instrumentation → oRPC → workspace token auth → workspace // service), where a Node built-in is a hard compile error. import { - cancelPendingDispatchesForWorkspace, + cancelPendingDispatchBatch, removeDispatchesFromSchedule, + WORKSPACE_DISPATCH_CANCEL_BATCH_SIZE, } from "@chatbotx.io/sequence-scheduler/dispatch-cancel" import { BaseService } from "../base.service" import { coexistService } from "../coexist/service" @@ -69,8 +70,16 @@ import { logger } from "../logger" import { userQuotaService } from "../user-quota/service" import { cancelInFlightBroadcastsForWorkspace, - completeActiveSequenceEnrollmentsForWorkspace, + completeActiveSequenceEnrollmentBatch, + SEQUENCE_ENROLLMENT_CANCEL_BATCH_SIZE, } from "./campaign-cleanup" +import { + assertPurgeDeadline, + drainInBatches, + isPurgeTimeoutError, + pause, + withPurgeTimeouts, +} from "./purge-batch" import { cancelSmartDelaysForWorkspace } from "./smart-delay-cleanup" type WorkspaceTeardownIntegration = { @@ -82,11 +91,6 @@ type DisconnectService = { disconnect(workspaceId: string): Promise } -type DispatchToRemove = { - bucket: number - id: string -} - export type WorkspaceTeardownIntegrations = Record< string, WorkspaceTeardownIntegration | undefined @@ -109,54 +113,20 @@ export type WorkspaceChannelsTeardownResult = { pendingReleases: PendingQuotaRelease[] } -/** - * High-volume tables that carry a direct `workspaceId` FK, ordered - * children-before-parents so each batched delete respects referential - * integrity on its own (independent of the deferred cascade). A workspace can - * hold millions of messages/contacts; deleting them via the single - * `DELETE FROM "Workspace"` FK cascade would scan every child table inside one - * transaction, holding locks and bloating WAL. Instead we drain these tables - * in small `ctid`-bounded chunks — one short autocommit statement each — and - * leave the remaining low-volume tables to the final cascade. - * - * Table names are the physical PG identifiers (not Drizzle models) because the - * delete is a raw `ctid IN (... LIMIT ...)` statement the query builder cannot - * express; keep them in sync with the schema if a table is renamed. - * - * `Message` and `Attachment` are deliberately NOT here: they are compressed - * TimescaleDB hypertables where `ctid` is unavailable ("transparent - * decompression only supports tableoid system column"). They are drained - * separately by `deleteWorkspaceHypertableRows`, which deletes by the - * `conversationId` segmentby column with the decompression cap lifted — the - * same technique as `messageCleanupService.purgeRow`. - */ -const HEAVY_WORKSPACE_TABLES = [ - "LeaderboardParticipant", - "AIConversationEmbedding", - "AIEmbedding", - "Conversation", - "TriggerExecution", - "FlowRun", - "Contact", -] as const - const HEAVY_PURGE_BATCH_SIZE = 5000 +const HEAVY_PURGE_BATCH_SIZES: Partial< + Record<(typeof HEAVY_WORKSPACE_TABLES)[number], number> +> = { + Contact: 1000, + Conversation: 1000, +} const INTER_CHUNK_DELAY_MS = 100 -// Conversation ids deleted per hypertable transaction. Deliberately small: -// deleting a compressed chunk decompresses its rows first, so each batch's -// decompression footprint (DB backend memory + WAL) is bounded to ~10 -// conversations' worth of >30-day history — keeping the spike well clear of a -// high-ingest system running alongside the purge. const HYPERTABLE_CONVERSATION_BATCH_SIZE = 10 -// Backstop so a single workspace with a runaway row count cannot spin forever; -// 5000 * 2000 = 10M rows per table per purge run. Anything beyond that drains -// on the next scheduled tick. const HEAVY_PURGE_MAX_BATCHES_PER_TABLE = 2000 -// Backstop for the per-conversation hypertable passes. Bounds one workspace's -// drain per run (~10k conversations per pass) so a single very large workspace -// cannot hold the purge distributed lock for a large fraction of the cron -// interval; the residue drains on the next scheduled tick. const HYPERTABLE_MAX_CONVERSATION_BATCHES = 1000 +const ANALYTICS_HYPERTABLE_MAX_SLICES = 1000 +const ANALYTICS_SLICE_MS = 24 * 60 * 60 * 1000 +const MIN_ANALYTICS_SLICE_MS = 60 * 1000 class WorkspaceLifecycleService extends BaseService { async disconnectWorkspaceChannels(props: { @@ -236,59 +206,82 @@ class WorkspaceLifecycleService extends BaseService { * broadcasts, active sequence enrollments and their queued dispatches, plus * pending/scheduled smart delays (wait steps and follow-ups). * - * Called when deletion is scheduled and when the owner's entitlement is torn - * down. The runtime guards (`withBlockedOwnerGuard`) would no-op these jobs - * anyway, but they would keep waking for the whole grace window — and the - * smart-delay scanner would churn them through claim → drop → reset every - * tick. Cancelling the rows is what makes the freeze quiet as well as safe. + * Called once deletion is due, and when the owner's entitlement is torn down. + * The runtime guards (`withBlockedOwnerGuard`) would no-op these jobs anyway, + * but they would keep waking for the whole teardown — and the smart-delay + * scanner would churn them through claim → drop → reset every tick. Cancelling + * the rows is what makes the terminal teardown quiet as well as safe. * * Each source is independent and best-effort: a Redis failure on one must not * leave the others armed. */ - async freezeWorkspaceRuntime(workspaceId: string): Promise { - const dispatchesToRemove: DispatchToRemove[] = await db.transaction( - async (tx) => { - await cancelInFlightBroadcastsForWorkspace({ - tx, - workspaceId, - }) + async freezeWorkspaceRuntime( + workspaceId: string, + deadlineAt: number, + ): Promise { + await withPurgeTimeouts({ + fn: async (tx) => + await cancelInFlightBroadcastsForWorkspace({ tx, workspaceId }), + table: "Broadcast", + workspaceId, + }) - await completeActiveSequenceEnrollmentsForWorkspace({ + const completedEnrollments = await drainInBatches({ + batchSize: SEQUENCE_ENROLLMENT_CANCEL_BATCH_SIZE, + deadlineAt, + maxBatches: 400, + runBatch: async (tx) => { + const count = await completeActiveSequenceEnrollmentBatch({ tx, workspaceId, }) + return { count, value: undefined } + }, + table: "ContactOnSequence", + workspaceId, + }) + logger.info( + { completedEnrollments, workspaceId }, + "workspace-freeze: completed sequence enrollments", + ) - return await cancelPendingDispatchesForWorkspace({ + const canceledDispatches = await drainInBatches({ + afterBatch: async ( + dispatches: Awaited>, + ) => { + await removeDispatchesFromSchedule(dispatches).catch((err) => { + logger.warn( + { err, workspaceId }, + "workspace-freeze: failed to remove sequence dispatches from schedule", + ) + }) + }, + batchSize: WORKSPACE_DISPATCH_CANCEL_BATCH_SIZE, + deadlineAt, + maxBatches: 400, + runBatch: async (tx) => { + const dispatches = await cancelPendingDispatchBatch({ client: tx, - removeFromSchedule: false, workspaceId, }) + return { count: dispatches.length, value: dispatches } }, + table: "SequenceDispatch", + workspaceId, + }) + logger.info( + { canceledDispatches, workspaceId }, + "workspace-freeze: canceled sequence dispatches", ) - try { - await removeDispatchesFromSchedule(dispatchesToRemove) - } catch (err) { - logger.warn( - { err, dispatchCount: dispatchesToRemove.length, workspaceId }, - "workspace-teardown: failed to remove dispatches from schedule", - ) - } - - try { - const canceledSmartDelays = await cancelSmartDelaysForWorkspace({ - workspaceId, - }) - logger.info( - { canceledSmartDelays, workspaceId }, - "workspace-freeze: canceled smart delays", - ) - } catch (err) { - logger.warn( - { err, workspaceId }, - "workspace-freeze: failed to cancel smart delays", - ) - } + const canceledSmartDelays = await cancelSmartDelaysForWorkspace({ + deadlineAt, + workspaceId, + }) + logger.info( + { canceledSmartDelays, workspaceId }, + "workspace-freeze: canceled smart delays", + ) } /** @@ -300,50 +293,127 @@ class WorkspaceLifecycleService extends BaseService { * partially-drained workspace simply continues on the next call. */ async purgeWorkspaceHeavyData(props: { - workspaceId: string batchSize?: number + deadlineAt: number + workspaceId: string }): Promise { - const batchSize = props.batchSize ?? HEAVY_PURGE_BATCH_SIZE + const defaultBatchSize = props.batchSize ?? HEAVY_PURGE_BATCH_SIZE let totalDeleted = 0 - // Drain the compressed hypertables (Message/Attachment) first, by - // conversationId, before the ctid loop deletes their parent Conversation - // rows. Uses the decompression-cap-lifted delete, not `ctid`. - totalDeleted += await this.deleteWorkspaceHypertableRows(props.workspaceId) - - // The partitioned, FK-less leaderboard score history cannot go through the - // `ctid` loop below (ctid repeats across partitions); it drains by primary - // key and its Redis rankings are dropped. - const leaderboardPurge = await purgeLeaderboardDataForWorkspace( + totalDeleted += await this.deleteWorkspaceAnalyticsRows( props.workspaceId, - { batchSize }, + props.deadlineAt, ) - totalDeleted += leaderboardPurge.deleted - if (!leaderboardPurge.complete) { - throw new WorkspacePurgeIncompleteError( - props.workspaceId, - "LeaderboardScoreEvent", - ) + totalDeleted += await this.deleteWorkspaceHypertableRows( + props.workspaceId, + props.deadlineAt, + ) + + for (const spec of PARTITIONED_WORKSPACE_TABLES) { + totalDeleted += await drainInBatches({ + afterBatch: async () => await pause(INTER_CHUNK_DELAY_MS), + batchSize: defaultBatchSize, + deadlineAt: props.deadlineAt, + maxBatches: HEAVY_PURGE_MAX_BATCHES_PER_TABLE, + runBatch: async (tx) => ({ + count: await workspacePurgeRepository.deletePartitionedBatch( + spec, + props.workspaceId, + defaultBatchSize, + tx, + ), + value: undefined, + }), + table: spec.table, + workspaceId: props.workspaceId, + }) + if ( + await workspacePurgeRepository.hasPartitionedWorkspaceRows( + spec, + props.workspaceId, + ) + ) { + throw new WorkspacePurgeIncompleteError(props.workspaceId, spec.table) + } } + totalDeleted += await purgeLeaderboardDataForWorkspace(props.workspaceId, { + batchSize: defaultBatchSize, + deadlineAt: props.deadlineAt, + }) + for (const table of HEAVY_WORKSPACE_TABLES) { - for (let batch = 0; batch < HEAVY_PURGE_MAX_BATCHES_PER_TABLE; batch++) { - const deleted = await this.deleteHeavyBatch( + const batchSize = HEAVY_PURGE_BATCH_SIZES[table] ?? defaultBatchSize + totalDeleted += await drainInBatches({ + afterBatch: async () => await pause(INTER_CHUNK_DELAY_MS), + batchSize, + deadlineAt: props.deadlineAt, + maxBatches: HEAVY_PURGE_MAX_BATCHES_PER_TABLE, + runBatch: async (tx) => ({ + count: await workspacePurgeRepository.deleteWorkspaceRowsBatch( + table, + props.workspaceId, + batchSize, + tx, + ), + value: undefined, + }), + table, + workspaceId: props.workspaceId, + }) + if ( + await workspacePurgeRepository.hasWorkspaceRows( table, props.workspaceId, - batchSize, ) - totalDeleted += deleted - if (deleted < batchSize) { + ) { + throw new WorkspacePurgeIncompleteError(props.workspaceId, table) + } + } + + for (const entry of NO_FK_WORKSPACE_TABLES) { + switch (entry.stage) { + case "retainedBilling": + // Billing evidence and deletion records intentionally outlive Workspace. + continue + case "contactActivity": + case "partitioned": + case "contactInboxPost": + case "leaderboard": + case "hypertable": + // These stages are drained by their specialized purge handlers. + continue + case "ctid": break + default: { + const exhaustive: never = entry + return exhaustive } - - await new Promise((resolve) => - setTimeout(resolve, INTER_CHUNK_DELAY_MS), - ) } - - if (await this.hasHeavyRows(table, props.workspaceId)) { + const { table } = entry + totalDeleted += await drainInBatches({ + afterBatch: async () => await pause(INTER_CHUNK_DELAY_MS), + batchSize: defaultBatchSize, + deadlineAt: props.deadlineAt, + maxBatches: HEAVY_PURGE_MAX_BATCHES_PER_TABLE, + runBatch: async (tx) => ({ + count: await workspacePurgeRepository.deleteWorkspaceRowsBatch( + table, + props.workspaceId, + defaultBatchSize, + tx, + ), + value: undefined, + }), + table, + workspaceId: props.workspaceId, + }) + if ( + await workspacePurgeRepository.hasWorkspaceRows( + table, + props.workspaceId, + ) + ) { throw new WorkspacePurgeIncompleteError(props.workspaceId, table) } } @@ -351,141 +421,100 @@ class WorkspaceLifecycleService extends BaseService { return totalDeleted } - private async deleteHeavyBatch( - table: (typeof HEAVY_WORKSPACE_TABLES)[number], + private async deleteWorkspaceAnalyticsRows( workspaceId: string, - batchSize: number, + deadlineAt: number, ): Promise { - // `ctid` self-join keeps the delete bounded to `batchSize` physical rows — - // Postgres has no `DELETE ... LIMIT`. The table name is a compile-time - // constant from HEAVY_WORKSPACE_TABLES, never caller input, so this raw - // identifier interpolation is not an injection surface. - const result = await db.execute(sql` - DELETE FROM ${sql.raw(`"${table}"`)} - WHERE "ctid" IN ( - SELECT "ctid" FROM ${sql.raw(`"${table}"`)} - WHERE "workspaceId" = ${workspaceId} - LIMIT ${batchSize} - ) - `) - return result.rowCount ?? 0 - } - - private async hasHeavyRows( - table: (typeof HEAVY_WORKSPACE_TABLES)[number], - workspaceId: string, - ): Promise { - const result = await db.execute(sql` - SELECT 1 - FROM ${sql.raw(`"${table}"`)} - WHERE "workspaceId" = ${workspaceId} - LIMIT 1 - `) - return result.rows.length > 0 + let deleted = 0 + for (const table of WORKSPACE_ANALYTICS_HYPERTABLES) { + let sliceMs = ANALYTICS_SLICE_MS + for (let batch = 0; batch < ANALYTICS_HYPERTABLE_MAX_SLICES; batch += 1) { + assertPurgeDeadline(deadlineAt, workspaceId, table) + const from = await workspacePurgeRepository.findNextAnalyticsRowAt( + table, + workspaceId, + ) + if (!from) { + break + } + const to = new Date(from.getTime() + sliceMs) + try { + deleted += await withPurgeTimeouts({ + fn: async (tx) => + await workspacePurgeRepository.deleteAnalyticsSlice( + table, + workspaceId, + from, + to, + tx, + ), + rethrowTimeout: true, + table, + workspaceId, + }) + sliceMs = ANALYTICS_SLICE_MS + } catch (err) { + if (isPurgeTimeoutError(err) && sliceMs > MIN_ANALYTICS_SLICE_MS) { + sliceMs = Math.max(MIN_ANALYTICS_SLICE_MS, Math.floor(sliceMs / 2)) + continue + } + if (isPurgeTimeoutError(err)) { + throw new WorkspacePurgeIncompleteError(workspaceId, table) + } + throw err + } + } + if (await workspacePurgeRepository.hasWorkspaceRows(table, workspaceId)) { + throw new WorkspacePurgeIncompleteError(workspaceId, table) + } + } + return deleted } - /** - * Delete a workspace's Message + Attachment rows. Both are compressed - * TimescaleDB hypertables (segmentby `workspaceId,conversationId`) where - * `ctid` is unsupported, so `deleteHeavyBatch` cannot touch them. Instead we - * drain them one bounded page of conversationIds at a time: deleting a page - * lifts the per-statement decompression cap for that transaction only, and the - * deleted ids drop out so the next page query walks forward to the next ones. - * - * Paging (rather than loading every conversationId up front) keeps worker - * memory constant — a workspace can hold millions of conversations, and - * materialising that whole id list in the process could exhaust its heap. - * Message is drained first (high volume), then any attachment-only - * conversations left behind. The whole workspace is being torn down, so no - * `createdAt` upper bound is needed. - */ private async deleteWorkspaceHypertableRows( workspaceId: string, + deadlineAt: number, ): Promise { - const deletePage = (conversationIds: string[]) => - db.transaction(async (tx) => { - await liftDecompressionLimit(tx) - const messageResult = await tx - .delete(messageModel) - .where( - and( - eq(messageModel.workspaceId, workspaceId), - inArray(messageModel.conversationId, conversationIds), - ), - ) - const attachmentResult = await tx - .delete(attachmentModel) - .where( - and( - eq(attachmentModel.workspaceId, workspaceId), - inArray(attachmentModel.conversationId, conversationIds), - ), - ) - return (messageResult.rowCount ?? 0) + (attachmentResult.rowCount ?? 0) - }) - let deleted = 0 - - // Pass 1: discovery driven off Message (the high-volume table). Each deleted - // page removes those conversationIds, so re-querying with the same LIMIT - // walks forward until none remain. The batch cap bounds a single run; any - // residue drains on the next scheduled tick. - for (let batch = 0; batch < HYPERTABLE_MAX_CONVERSATION_BATCHES; batch++) { - const rows = await db - .selectDistinct({ conversationId: messageModel.conversationId }) - .from(messageModel) - .where(eq(messageModel.workspaceId, workspaceId)) - // Ordered so Postgres can serve each page from the (workspaceId, - // conversationId) index as a bounded scan instead of re-aggregating the - // whole workspace on every batch. - .orderBy(messageModel.conversationId) - .limit(HYPERTABLE_CONVERSATION_BATCH_SIZE) - if (rows.length === 0) { - break - } - deleted += await deletePage(rows.map((row) => row.conversationId)) - await new Promise((resolve) => setTimeout(resolve, INTER_CHUNK_DELAY_MS)) - } - - if (await this.hasHypertableRows(messageModel, workspaceId)) { - throw new WorkspacePurgeIncompleteError(workspaceId, "Message") - } - - // Pass 2: attachment-only conversations (attachments whose Message rows were - // already gone) that pass 1 never enumerated. - for (let batch = 0; batch < HYPERTABLE_MAX_CONVERSATION_BATCHES; batch++) { - const rows = await db - .selectDistinct({ conversationId: attachmentModel.conversationId }) - .from(attachmentModel) - .where(eq(attachmentModel.workspaceId, workspaceId)) - .orderBy(attachmentModel.conversationId) - .limit(HYPERTABLE_CONVERSATION_BATCH_SIZE) - if (rows.length === 0) { - break + for (const table of ["Message", "Attachment"] as const) { + let deletedFromTable = 0 + await drainInBatches({ + afterBatch: async (count: number) => { + deletedFromTable += count + await pause(INTER_CHUNK_DELAY_MS) + }, + batchSize: HYPERTABLE_CONVERSATION_BATCH_SIZE, + deadlineAt, + maxBatches: HYPERTABLE_MAX_CONVERSATION_BATCHES, + runBatch: async (tx) => { + const conversationIds = + await workspacePurgeRepository.listMessageConversationPage( + table, + workspaceId, + HYPERTABLE_CONVERSATION_BATCH_SIZE, + tx, + ) + const count = + conversationIds.length === 0 + ? 0 + : await workspacePurgeRepository.deleteMessagesAndAttachments( + workspaceId, + conversationIds, + tx, + ) + return { count: conversationIds.length, value: count } + }, + table, + workspaceId, + }) + deleted += deletedFromTable + if (await workspacePurgeRepository.hasWorkspaceRows(table, workspaceId)) { + throw new WorkspacePurgeIncompleteError(workspaceId, table) } - deleted += await deletePage(rows.map((row) => row.conversationId)) - await new Promise((resolve) => setTimeout(resolve, INTER_CHUNK_DELAY_MS)) - } - - if (await this.hasHypertableRows(attachmentModel, workspaceId)) { - throw new WorkspacePurgeIncompleteError(workspaceId, "Attachment") } - return deleted } - private async hasHypertableRows( - model: typeof messageModel | typeof attachmentModel, - workspaceId: string, - ): Promise { - const rows = await db - .selectDistinct({ conversationId: model.conversationId }) - .from(model) - .where(eq(model.workspaceId, workspaceId)) - .limit(1) - return rows.length > 0 - } - /** Returns the ids of the owner's workspaces this call tore down, so callers that need to attribute a per-workspace side effect (e.g. audit rows) don't have to re-query. */ async deactivateOwnerWorkspaces(props: { ownerId: string @@ -523,10 +552,7 @@ class WorkspaceLifecycleService extends BaseService { } } - await userQuotaService.reconcileOwnerPoolUsage( - props.ownerId, - workspaces[0]?.tenantId ?? ROOT_TENANT_ID, - ) + await userQuotaService.reconcileOwnerAfterTeardown(props.ownerId) return workspaces.map((workspace) => workspace.id) } diff --git a/packages/business/src/workspace-lifecycle/smart-delay-cleanup.ts b/packages/business/src/workspace-lifecycle/smart-delay-cleanup.ts index 5791ea600c..024091b9e1 100644 --- a/packages/business/src/workspace-lifecycle/smart-delay-cleanup.ts +++ b/packages/business/src/workspace-lifecycle/smart-delay-cleanup.ts @@ -1,13 +1,10 @@ import { buildJobId } from "@chatbotx.io/flow-config" import { integrationQueue } from "@chatbotx.io/worker-config" import { logger } from "../logger" -import { smartDelayService } from "../smart-delay/service" +import { type SmartDelayRow, smartDelayService } from "../smart-delay/service" +import { drainInBatches } from "./purge-batch" export const SMART_DELAY_CANCEL_BATCH_SIZE = 500 -// Backstop so one workspace with a runaway backlog cannot spin the freeze call -// forever: 500 * 400 = 200k rows per call. Whatever is left is harmless — the -// worker-side guard no-ops those wake-ups, and the purge cascade removes the -// rows when the grace window expires. const MAX_CANCEL_BATCHES = 400 /** @@ -16,47 +13,42 @@ const MAX_CANCEL_BATCHES = 400 * * Cancelling the row is the part that matters. A wake-up job for a `canceled` * row is already a no-op (`wait-resume` requires `status === 'scheduled'` and - * `claimForRun` CASes on it), and — more importantly — the scanner's - * stuck-scheduled sweeper can only reset rows that are still `scheduled`, so a - * canceled row stops churning through claim → drop → reset for the rest of the - * 24-hour grace window. + * `claimForRun` CASes on it), and the scanner's stuck-scheduled sweeper can + * only reset rows that are still `scheduled`. */ export async function cancelSmartDelaysForWorkspace(props: { + deadlineAt: number workspaceId: string }): Promise { - let canceled = 0 - - for (let batch = 0; batch < MAX_CANCEL_BATCHES; batch += 1) { - const rows = await smartDelayService.cancelActiveForWorkspace({ - limit: SMART_DELAY_CANCEL_BATCH_SIZE, - workspaceId: props.workspaceId, - }) - - if (rows.length === 0) { - break - } - - canceled += rows.length - - // Best-effort: the rows are already canceled, so a job that survives is - // inert. Never let a Redis hiccup abort the cancellation loop. - const removals = await Promise.allSettled( - rows.map((row) => - integrationQueue.remove(buildJobId(row.id, row.triggerAt)), - ), - ) - const failed = removals.filter((result) => result.status === "rejected") - if (failed.length > 0) { - logger.warn( - { failedCount: failed.length, workspaceId: props.workspaceId }, - "workspace-freeze: failed to remove smart-delay jobs", + return await drainInBatches({ + afterBatch: async (rows: Pick[]) => { + // Best-effort: the rows are already canceled, so a job that survives is + // inert. Never let a Redis hiccup abort the cancellation loop. + const removals = await Promise.allSettled( + rows.map((row) => + integrationQueue.remove(buildJobId(row.id, row.triggerAt)), + ), ) - } - - if (rows.length < SMART_DELAY_CANCEL_BATCH_SIZE) { - break - } - } - - return canceled + const failed = removals.filter((result) => result.status === "rejected") + if (failed.length > 0) { + logger.warn( + { failedCount: failed.length, workspaceId: props.workspaceId }, + "workspace-freeze: failed to remove smart-delay jobs", + ) + } + }, + batchSize: SMART_DELAY_CANCEL_BATCH_SIZE, + deadlineAt: props.deadlineAt, + maxBatches: MAX_CANCEL_BATCHES, + runBatch: async (tx) => { + const rows = await smartDelayService.cancelActiveForWorkspace({ + limit: SMART_DELAY_CANCEL_BATCH_SIZE, + tx, + workspaceId: props.workspaceId, + }) + return { count: rows.length, value: rows } + }, + table: "ContactOnSmartDelay", + workspaceId: props.workspaceId, + }) } diff --git a/packages/business/src/workspace/__tests__/service.test.ts b/packages/business/src/workspace/__tests__/service.test.ts index 2593fc651d..5f7f4f1f92 100644 --- a/packages/business/src/workspace/__tests__/service.test.ts +++ b/packages/business/src/workspace/__tests__/service.test.ts @@ -6,6 +6,7 @@ const mocks = vi.hoisted(() => ({ workspaceInsert: vi.fn(), workspaceInsertValues: vi.fn(), workspaceDelete: vi.fn(), + workspaceUpdate: vi.fn(), workspaceQuotaRelease: vi.fn(), tryConsume: vi.fn(), createMember: vi.fn(), @@ -32,9 +33,19 @@ vi.mock("../../workspace-usage/service", () => ({ }, })) +vi.mock("../../workspace-deletion-record/service", () => ({ + workspaceDeletionRecordService: { + markPurged: vi.fn(async () => undefined), + recordForWorkspace: vi.fn(async () => undefined), + }, +})) + vi.mock("@chatbotx.io/database/client", () => ({ db: { - query: { userModel: { findFirst: vi.fn(async () => undefined) } }, + query: { + userModel: { findFirst: vi.fn(async () => undefined) }, + workspaceModel: { findFirst: vi.fn(async () => undefined) }, + }, insert: mocks.workspaceInsert, delete: mocks.workspaceDelete, transaction: mocks.dbTransaction, @@ -67,7 +78,7 @@ vi.mock("@chatbotx.io/database/client", () => ({ inArray: vi.fn(), and: vi.fn(), isNull: vi.fn(), - sql: vi.fn(), + sql: Object.assign(vi.fn(), { raw: vi.fn(() => "") }), })) vi.mock("@chatbotx.io/database/partials", async (importOriginal) => { @@ -81,6 +92,7 @@ vi.mock("@chatbotx.io/database/partials", async (importOriginal) => { vi.mock("@chatbotx.io/database/schema", () => ({ ROOT_TENANT_ID: "1", + workspaceDeletionRecordModel: { workspaceId: {} }, workspaceMemberModel: {}, workspaceModel: {}, })) @@ -124,7 +136,7 @@ vi.mock("../../quota-enforcement/service", () => ({ vi.mock("../../user-quota/service", () => ({ userQuotaService: { getForUser: mocks.getForUser, - reconcileOwnerPoolUsage: vi.fn(async () => undefined), + reconcileOwnerAfterTeardown: vi.fn(async () => undefined), }, })) @@ -140,6 +152,23 @@ vi.mock("../../workspace-lifecycle/service", () => ({ }, })) +vi.mock("../../workspace-lifecycle/purge-batch", () => ({ + withPurgeTimeouts: vi.fn( + async ({ + fn, + }: { + fn: (tx: { + delete: typeof mocks.workspaceDelete + update: typeof mocks.workspaceUpdate + }) => Promise + }) => + await fn({ + delete: mocks.workspaceDelete, + update: mocks.workspaceUpdate, + }), + ), +})) + vi.mock("../../connection/state-service", () => ({ connectionStateService: { releasePendingQuota: vi.fn(async () => undefined), @@ -216,7 +245,12 @@ beforeEach(() => { }), }) mocks.workspaceDelete.mockReturnValue({ - where: vi.fn().mockResolvedValue(undefined), + where: vi.fn(() => ({ + returning: vi.fn().mockResolvedValue([{ id: "workspace-1" }]), + })), + }) + mocks.workspaceUpdate.mockReturnValue({ + set: vi.fn(() => ({ where: vi.fn().mockResolvedValue(undefined) })), }) }) @@ -390,9 +424,9 @@ describe("WorkspaceService.purgeDueScheduled", () => { workspaceService.purgeDueScheduled({ chunkSize: 1, maxChunks: 1 }), ).resolves.toBe(1) - expect(mocks.purgeWorkspaceHeavyData).toHaveBeenCalledWith({ - workspaceId: "w1", - }) + expect(mocks.purgeWorkspaceHeavyData).toHaveBeenCalledWith( + expect.objectContaining({ workspaceId: "w1" }), + ) expect(tx.update).not.toHaveBeenCalled() }) @@ -433,7 +467,9 @@ describe("WorkspaceService.purgeDueScheduled", () => { }) const deleteError = new Error("Failed query", { cause: pgCause }) mocks.workspaceDelete.mockReturnValueOnce({ - where: vi.fn().mockRejectedValue(deleteError), + where: vi.fn(() => ({ + returning: vi.fn().mockRejectedValue(deleteError), + })), }) await expect( diff --git a/packages/business/src/workspace/service.ts b/packages/business/src/workspace/service.ts index c15ac63444..8a2281bc9e 100644 --- a/packages/business/src/workspace/service.ts +++ b/packages/business/src/workspace/service.ts @@ -37,6 +37,8 @@ import { isCommunity } from "../keys" import { logger } from "../logger" import { quotaEnforcementService } from "../quota-enforcement/service" import { userQuotaService } from "../user-quota/service" +import { workspaceDeletionRecordService } from "../workspace-deletion-record/service" +import { withPurgeTimeouts } from "../workspace-lifecycle/purge-batch" import { type WorkspaceTeardownIntegrations, workspaceLifecycleService, @@ -65,6 +67,7 @@ const stableKey = (where: WorkspaceWhere) => JSON.stringify(Object.fromEntries(Object.entries(where).sort())) const PURGE_WORKSPACE_TEARDOWN_CONCURRENCY = 5 +const PURGE_WORKSPACE_MAX_DURATION_MS = 45 * 60 * 1000 const COMMUNITY_MAX_WORKSPACES = 1 const WORKSPACE_LIMIT_LOCK_TIMEOUT_SECONDS = 30 @@ -284,9 +287,15 @@ class WorkspaceService extends BaseService { // here while nested in an open db.transaction(...) would enqueue an audit // row for a write that might still roll back. const changedKeys = Object.keys(data) - const onlyScheduledDeletionChanged = - changedKeys.length === 1 && changedKeys[0] === "scheduledDeletionAt" - if (!props.tx && changedKeys.length > 0 && !onlyScheduledDeletionChanged) { + const deletionMetadataKeys = new Set([ + "deletionRequestedAt", + "deletionRequestedById", + "scheduledDeletionAt", + ]) + const onlyDeletionMetadataChanged = + changedKeys.length > 0 && + changedKeys.every((key) => deletionMetadataKeys.has(key)) + if (!props.tx && changedKeys.length > 0 && !onlyDeletionMetadataChanged) { const nameChanged = data.name !== undefined && data.name !== previousName await this.audit( "update", @@ -355,6 +364,7 @@ class WorkspaceService extends BaseService { } async scheduleDeletion(props: { + actorId: string id: string tx?: DatabaseClient }): Promise { @@ -363,6 +373,8 @@ class WorkspaceService extends BaseService { id: props.id, tx, data: { + deletionRequestedAt: new Date(), + deletionRequestedById: props.actorId, scheduledDeletionAt: nextScheduledDeletionAt(), }, }) @@ -384,6 +396,8 @@ class WorkspaceService extends BaseService { id: props.id, tx, data: { + deletionRequestedAt: null, + deletionRequestedById: null, scheduledDeletionAt: null, }, }) @@ -410,10 +424,19 @@ class WorkspaceService extends BaseService { }): Promise { const chunkSize = props?.chunkSize ?? 500 const maxChunks = props?.maxChunks ?? 20 + const deadlineAt = Date.now() + PURGE_WORKSPACE_MAX_DURATION_MS let totalDeleted = 0 const reconciles = new Map() for (let chunk = 0; chunk < maxChunks; chunk++) { + if (Date.now() >= deadlineAt) { + logger.info( + { durationMs: PURGE_WORKSPACE_MAX_DURATION_MS }, + "workspace-purge: deadline reached, deferring remaining work", + ) + break + } + // Claim a chunk of due workspaces in a short transaction and immediately // release the FOR UPDATE locks. The heavy per-workspace teardown runs // outside any transaction so million-row deletes never hold a workspace @@ -467,7 +490,11 @@ class WorkspaceService extends BaseService { claimed.rows, PURGE_WORKSPACE_TEARDOWN_CONCURRENCY, async (workspace) => - await this.teardownDueWorkspace(workspace, props?.integrations), + await this.teardownDueWorkspace( + workspace, + props?.integrations, + deadlineAt, + ), ) const deleted = teardownResults.filter(isNonNull) @@ -510,11 +537,11 @@ class WorkspaceService extends BaseService { await Promise.allSettled( [...reconciles.values()].map(async ({ ownerId, tenantId }) => { try { - await userQuotaService.reconcileOwnerPoolUsage(ownerId, tenantId) + await userQuotaService.reconcileOwnerAfterTeardown(ownerId, tenantId) } catch (err) { logger.error( { err, ownerId, tenantId }, - "workspace-purge: failed to reconcile owner pool usage", + "workspace-purge: failed to reconcile owner quota", ) } }), @@ -523,17 +550,42 @@ class WorkspaceService extends BaseService { return totalDeleted } + private async writeDeletionRecord(workspace: DueWorkspace): Promise { + const record = await workspaceDeletionRecordService.recordForWorkspace({ + workspace, + }) + if (record?.created) { + logger.info( + { + ownerId: workspace.ownerId, + usageSnapshot: record.usageSnapshot, + workspaceId: workspace.id, + }, + "workspace-purge: deletion record written", + ) + } + } + private async teardownDueWorkspace( workspace: DueWorkspace, - integrations?: WorkspaceTeardownIntegrations, + integrations: WorkspaceTeardownIntegrations | undefined, + deadlineAt: number, ): Promise { try { + if (Date.now() >= deadlineAt) { + throw new WorkspacePurgeIncompleteError(workspace.id, "deadline") + } + const fencedWorkspace = await this.acquirePurgeFence(workspace.id) if (!fencedWorkspace) { return null } + await this.writeDeletionRecord(fencedWorkspace) - await workspaceLifecycleService.freezeWorkspaceRuntime(fencedWorkspace.id) + await workspaceLifecycleService.freezeWorkspaceRuntime( + fencedWorkspace.id, + deadlineAt, + ) await workspaceLifecycleService .disconnectWorkspaceIntegrations(fencedWorkspace.id) @@ -562,8 +614,12 @@ class WorkspaceService extends BaseService { // Drain high-volume child tables in small self-committing batches before // the FK cascade, so no single statement deletes millions of rows under lock. await workspaceLifecycleService.purgeWorkspaceHeavyData({ + deadlineAt, workspaceId: fencedWorkspace.id, }) + if (Date.now() >= deadlineAt) { + throw new WorkspacePurgeIncompleteError(fencedWorkspace.id, "deadline") + } const postPurge = await contactInboxPostService.purgeWorkspace({ workspaceId: fencedWorkspace.id, @@ -585,9 +641,33 @@ class WorkspaceService extends BaseService { ) } - // Best-effort: never block/roll back the purge if release fails — - // `reconcileOwnerPoolUsage` below re-derives `workspaces` from source - // for every affected owner regardless. + if (Date.now() >= deadlineAt) { + throw new WorkspacePurgeIncompleteError(fencedWorkspace.id, "deadline") + } + + const deletedWorkspace = await withPurgeTimeouts({ + table: "Workspace", + workspaceId: fencedWorkspace.id, + fn: async (tx) => { + const deleted = await tx + .delete(workspaceModel) + .where(eq(workspaceModel.id, fencedWorkspace.id)) + .returning({ id: workspaceModel.id }) + if (deleted[0]) { + await workspaceDeletionRecordService.markPurged({ + workspaceId: fencedWorkspace.id, + tx, + }) + } + return deleted + }, + }) + if (!deletedWorkspace[0]) { + throw new WorkspacePurgeIncompleteError(fencedWorkspace.id, "Workspace") + } + + // Best-effort: never roll back a completed purge if release fails — + // the post-loop reconciliation re-derives workspaces from source. await quotaEnforcementService .release({ userId: workspace.ownerId, metric: "workspaces" }) .catch((err) => { @@ -600,11 +680,6 @@ class WorkspaceService extends BaseService { "workspace-purge: workspace quota release failed", ) }) - - await db - .delete(workspaceModel) - .where(eq(workspaceModel.id, fencedWorkspace.id)) - return fencedWorkspace } catch (err) { if (err instanceof WorkspacePurgeIncompleteError) { diff --git a/packages/database/__tests__/purge-fk-indexes.test.ts b/packages/database/__tests__/purge-fk-indexes.test.ts new file mode 100644 index 0000000000..4937514791 --- /dev/null +++ b/packages/database/__tests__/purge-fk-indexes.test.ts @@ -0,0 +1,186 @@ +import { readFileSync } from "node:fs" +import { join } from "node:path" +import { getTableConfig } from "drizzle-orm/pg-core" +import { describe, expect, test } from "vitest" +import { aiConversationEmbeddingModel } from "../src/schema/ai-conversation-embedding" +import { aiEmbeddingModel } from "../src/schema/ai-embedding" +import { contactsOnBroadcastsModel } from "../src/schema/contact-on-broadcast" +import { contactsToTagsModel } from "../src/schema/contact-to-tag" +import { flowRunModel } from "../src/schema/flow-run" +import { flowVersionModel } from "../src/schema/flow-version" +import { leaderboardParticipantModel } from "../src/schema/leaderboard-participant" +import { sequenceDispatchModel } from "../src/schema/sequence-dispatch" + +const NORMAL_MIGRATION_PATH = join( + import.meta.dirname, + "../drizzle/20261025020838_add_workspace_purge_indexes/migration.sql", +) +const PARTITIONED_MIGRATION_PATH = join( + import.meta.dirname, + "../drizzle/20261025020711_add_workspace_purge_partitioned_indexes/migration.sql", +) + +const normalTargets = [ + { + columns: ["workspaceId", "conversationId", "sourceId", "status"], + index: "AIConversationEmbedding_lookup_idx", + model: aiConversationEmbeddingModel, + table: "AIConversationEmbedding", + }, + { + columns: ["aiFileId"], + index: "AIEmbedding_aiFileId_idx", + model: aiEmbeddingModel, + table: "AIEmbedding", + }, + { + columns: ["tagId"], + index: "ContactToTag_tagId_idx", + model: contactsToTagsModel, + table: "ContactToTag", + }, + { + columns: ["workspaceId"], + index: "FlowRun_workspaceId_idx", + model: flowRunModel, + table: "FlowRun", + }, + { + columns: ["flowId"], + index: "FlowRun_flowId_idx", + model: flowRunModel, + table: "FlowRun", + }, + { + columns: ["flowVersionId"], + index: "FlowRun_flowVersionId_idx", + model: flowRunModel, + table: "FlowRun", + }, + { + columns: ["workspaceId"], + index: "FlowVersion_workspaceId_idx", + model: flowVersionModel, + table: "FlowVersion", + }, + { + columns: ["flowId"], + index: "FlowVersion_flowId_idx", + model: flowVersionModel, + table: "FlowVersion", + }, + { + columns: ["workspaceId"], + index: "LeaderboardParticipant_workspaceId_idx", + model: leaderboardParticipantModel, + table: "LeaderboardParticipant", + }, + { + columns: ["referrerContactId"], + index: "LeaderboardParticipant_referrerContactId_idx", + model: leaderboardParticipantModel, + table: "LeaderboardParticipant", + }, +] as const + +const partitionedTargets = [ + { + columns: ["conversationId"], + index: "ContactOnBroadcast_conversationId_idx", + model: contactsOnBroadcastsModel, + partitions: 64, + table: "ContactOnBroadcast", + }, + { + columns: ["sequenceId"], + index: "SequenceDispatch_sequenceId_idx", + model: sequenceDispatchModel, + partitions: 64, + table: "SequenceDispatch", + }, + { + columns: ["stepId"], + index: "SequenceDispatch_stepId_idx", + model: sequenceDispatchModel, + partitions: 64, + table: "SequenceDispatch", + }, +] as const + +const indexColumns = ( + model: Parameters[0], + index: string, +) => { + const candidate = getTableConfig(model).indexes.find( + (entry) => entry.config.name === index, + ) + expect(candidate).toBeDefined() + return candidate?.config.columns.map((column) => + "name" in column ? column.name : String(column), + ) +} + +describe("workspace purge FK indexes", () => { + test.each(normalTargets)("$table declares $index with the exact FK prefix", ({ + columns, + index, + model, + }) => { + expect(indexColumns(model, index)).toEqual(columns) + }) + + test.each( + partitionedTargets, + )("$table declares $index with the exact FK prefix", ({ + columns, + index, + model, + }) => { + expect(indexColumns(model, index)).toEqual(columns) + }) + + test("normal indexes build concurrently and are restart safe", () => { + const sql = readFileSync(NORMAL_MIGRATION_PATH, "utf8") + for (const { index, table } of normalTargets) { + expect(sql).toContain( + `CREATE INDEX CONCURRENTLY IF NOT EXISTS "${index}" ON "${table}"`, + ) + expect(sql).toContain(`to_regclass('"${index}"')`) + expect(sql).toContain(`DROP INDEX "${index}"`) + expect(sql).not.toContain(`'"${index}"'::regclass`) + } + }) + + test.each( + partitionedTargets, + )("$table builds all child indexes concurrently and attaches the parent", ({ + index, + partitions, + table, + }) => { + const statements = readFileSync(PARTITIONED_MIGRATION_PATH, "utf8") + .split("--> statement-breakpoint") + .map((statement) => statement.trim()) + .filter(Boolean) + const childIndexSuffix = index.slice(table.length + 1) + const childIndexes = statements.filter( + (statement) => + statement.startsWith( + `CREATE INDEX CONCURRENTLY IF NOT EXISTS "${table}_p`, + ) && statement.includes(`_${childIndexSuffix}"`), + ) + expect(childIndexes).toHaveLength(partitions) + expect( + statements.some((statement) => + statement.includes( + `CREATE INDEX IF NOT EXISTS "${index}" ON ONLY "${table}"`, + ), + ), + ).toBe(true) + expect( + statements.some((statement) => + statement.includes(`ALTER INDEX "${index}" ATTACH PARTITION`), + ), + ).toBe(true) + }) +}) diff --git a/packages/database/__tests__/workspace-purge-coverage.test.ts b/packages/database/__tests__/workspace-purge-coverage.test.ts new file mode 100644 index 0000000000..faddafc74d --- /dev/null +++ b/packages/database/__tests__/workspace-purge-coverage.test.ts @@ -0,0 +1,223 @@ +import { readdirSync, readFileSync } from "node:fs" +import { join } from "node:path" +import { describe, expect, test } from "vitest" +import { + HEAVY_WORKSPACE_TABLES, + NO_FK_WORKSPACE_TABLES, + PARTITIONED_WORKSPACE_TABLES, + WORKSPACE_ANALYTICS_HYPERTABLES, +} from "../src/repositories/workspace-purge" + +type SnapshotEntry = { + columns?: Array + entityType: string + name: string + onDelete?: string + table?: string + tableTo?: string +} + +type Snapshot = { ddl: SnapshotEntry[] } + +const MIGRATION_DIRECTORY = /^\d+_/ + +const drizzleDirectory = join(import.meta.dirname, "../drizzle") +const snapshotPath = join( + drizzleDirectory, + readdirSync(drizzleDirectory) + .filter((entry) => MIGRATION_DIRECTORY.test(entry)) + .sort() + .at(-1) ?? "", + "snapshot.json", +) +const snapshot = JSON.parse(readFileSync(snapshotPath, "utf8")) as Snapshot +const entriesByType = (entityType: string) => + snapshot.ddl.filter((entry) => entry.entityType === entityType) +const key = (table: string, columns: readonly string[]) => + `${table}:${columns.join(",")}` +const indexColumns = (entry: SnapshotEntry) => + (entry.columns ?? []).map((column) => + typeof column === "string" ? column : column.value, + ) +const hasPrefix = (candidate: readonly string[], expected: readonly string[]) => + candidate.length >= expected.length && + expected.every((column, index) => candidate[index] === column) + +const LEGACY_UNINDEXED_FKS = [ + "AdsConversionEvent:integrationWhatsappId", + "AdsConversionEvent:integrationMessengerId", + "AdsConversionEvent:integrationInstagramId", + "AdsConversionRule:integrationWhatsappId", + "AdsConversionRule:integrationFacebookAdsId", + "AdsConversionRule:integrationMessengerId", + "AdsConversionRule:integrationInstagramId", + "AIFunction:triggerFlowId", + "AIFunction:workspaceId", + "AIMCPServer:workspaceId", + "Appointment:conversationId", + "Appointment:contactInboxId", + "AppointmentCalendar:confirmationFlowId", + "AppointmentCalendar:cancellationFlowId", + "AppointmentCalendar:externalConnectionId", + "AppointmentCalendarReminder:flowId", + "AppointmentReminderDispatch:workspaceId", + "AppointmentReminderDispatch:reminderConfigId", + "Account:userId", + "Account:tenantId", + "Invitation:workspaceId", + "Invitation:invitedBy", + "Session:userId", + "AutomatedResponse:folderId", + "AutomatedResponse:flowId", + "BotField:folderId", + "Broadcast:integrationWhatsappId", + "Broadcast:integrationMessengerId", + "CoexistSyncRun:requestedByUserId", + "ConnectSession:targetConnectionId", + "ConnectSession:actorUserId", + "ConnectSession:actorTokenId", + "Connection:createdBy", + "ContactNote:createdById", + "Conversation:assignedUserId", + "Conversation:assignedInboxTeamId", + "ConversationParticipant:userId", + "Coupon:topicId", + "CouponTopic:createdById", + "CustomField:folderId", + "DynamicImage:customFieldId", + "AuditLog:userId", + "File:userId", + "Flow:folderId", + "GoogleAdsConversionEvent:integrationGoogleAdsId", + "Import:userId", + "InboxTeamMember:inboxTeamId", + "InboxTeamMember:userId", + "IntegrationGoogleCalendar:workspaceId", + "IntegrationGoogleSheet:workspaceId", + "IntegrationOpenai:aiAgentId", + "IntegrationOutlookCalendar:workspaceId", + "Leaderboard:referralWelcomeFlowId", + "LeaderboardAuditLog:contactId", + "LeaderboardAuditLog:actorUserId", + "MagicLinkStat:linkId", + "MessagingAdOperation:createdBy", + "MetaCatalogSyncRun:integrationMetaCatalogId", + "MetaCatalogSyncRun:categoryId", + "MiniAppPublication:integrationWhatsappId", + "MiniAppPublication:whatsappFlowId", + "MiniAppSubmission:workspaceId", + "MiniAppUpload:workspaceId", + "DiscountCodeRedemption:workspaceId", + "OrderItem:productId", + "OrderItem:vendorId", + "Questionnaire:triggerFlowId", + "RefLinkStat:linkId", + "Reflink:flowId", + "Reflink:customFieldId", + "Reflink:widgetLogoFileId", + "Template:createdBy", + "TemplateInstallation:installFolderId", + "TemplateInstallation:installedBy", + "UserDeviceToken:workspaceId", + "WhatsappCall:answeredByUserId", + "WhatsappCall:initiatedByUserId", + "WhatsappSignupSession:ownerId", + "WhatsappSignupSession:workspaceId", + "WorkingHoursDateOverride:workingHoursId,workspaceId", + "WorkingHoursMember:userId", + "WorkingHoursMember:workingHoursId,workspaceId", + "Workspace:ownerId", + "WorkspaceMember:userId", +] + +describe("workspace purge coverage", () => { + test("registers every workspace-scoped table outside the Workspace cascade", () => { + const foreignKeys = entriesByType("fks") + const cascadeReachable = new Set(["Workspace"]) + for (let changed = true; changed; ) { + changed = false + for (const foreignKey of foreignKeys) { + if ( + foreignKey.onDelete === "CASCADE" && + foreignKey.table && + foreignKey.tableTo && + cascadeReachable.has(foreignKey.tableTo) && + !cascadeReachable.has(foreignKey.table) + ) { + cascadeReachable.add(foreignKey.table) + changed = true + } + } + } + + const registered = new Set([ + ...HEAVY_WORKSPACE_TABLES, + ...PARTITIONED_WORKSPACE_TABLES.map(({ table }) => table), + ...WORKSPACE_ANALYTICS_HYPERTABLES, + ...NO_FK_WORKSPACE_TABLES.map(({ table }) => table), + ]) + const workspaceTables = new Set( + entriesByType("columns") + .filter((column) => column.name === "workspaceId" && column.table) + .map((column) => column.table as string), + ) + const missing = [...workspaceTables] + .filter( + (table) => !(cascadeReachable.has(table) || registered.has(table)), + ) + .sort() + + expect( + missing, + "Add the table to workspace-purge/tables.ts and follow the workspace-purge skill.", + ).toEqual([]) + }) + + test("retains billing and deletion records outside workspace cascades", () => { + const retained = NO_FK_WORKSPACE_TABLES.filter( + ({ stage }) => stage === "retainedBilling", + ).map(({ table }) => table) + + expect(retained).toEqual([ + "WorkspaceMac", + "WorkspaceBotMessageUsage", + "WorkspaceDeletionRecord", + ]) + }) + + test("does not add an unindexed foreign key or retain a fixed baseline entry", () => { + const support = [ + ...entriesByType("indexes"), + ...entriesByType("pks"), + ...entriesByType("uniques"), + ] + const uncovered = entriesByType("fks") + .filter((foreignKey) => { + const columns = foreignKey.columns ?? [] + return !support.some( + (entry) => + entry.table === foreignKey.table && + hasPrefix(indexColumns(entry), columns), + ) + }) + .map((foreignKey) => + key(foreignKey.table ?? "", foreignKey.columns ?? []), + ) + .sort() + const unexpected = uncovered.filter( + (foreignKey) => !LEGACY_UNINDEXED_FKS.includes(foreignKey), + ) + const fixedBaseline = LEGACY_UNINDEXED_FKS.filter( + (foreignKey) => !uncovered.includes(foreignKey), + ).sort() + + expect( + unexpected, + "Add a leading FK index before adding a new foreign key.", + ).toEqual([]) + expect( + fixedBaseline, + "Remove fixed FKs from LEGACY_UNINDEXED_FKS.", + ).toEqual([]) + }) +}) diff --git a/packages/database/__tests__/workspace-purge-repository.test.ts b/packages/database/__tests__/workspace-purge-repository.test.ts new file mode 100644 index 0000000000..aae43cfdec --- /dev/null +++ b/packages/database/__tests__/workspace-purge-repository.test.ts @@ -0,0 +1,18 @@ +import { describe, expect, test, vi } from "vitest" +import { workspacePurgeRepository } from "../src/repositories/workspace-purge" + +describe("workspace purge repository", () => { + test("decodes an analytics timestamp returned by the postgres driver", async () => { + const execute = vi.fn().mockResolvedValue({ + rows: [{ occurredAt: "2026-10-24T10:00:00.000Z" }], + }) + + const occurredAt = await workspacePurgeRepository.findNextAnalyticsRowAt( + "AnalyticsAgentResponseEvent", + "1", + { execute } as never, + ) + + expect(occurredAt).toEqual(new Date("2026-10-24T10:00:00.000Z")) + }) +}) diff --git a/packages/database/drizzle/20261003155653_add_connection_tables/snapshot.json b/packages/database/drizzle/20261003155653_add_connection_tables/snapshot.json index bcdb94f6fd..c294a6412f 100644 --- a/packages/database/drizzle/20261003155653_add_connection_tables/snapshot.json +++ b/packages/database/drizzle/20261003155653_add_connection_tables/snapshot.json @@ -3,7 +3,7 @@ "dialect": "postgres", "id": "6910e6fe-7167-4fdc-8493-a5c74c8693e9", "prevIds": [ - "a1f7c613-421d-4bd6-a1eb-1f8317bc11fe" + "4860d7e1-09ce-4eb2-9d69-62529ea3d3ac" ], "ddl": [ { diff --git a/packages/database/drizzle/20261004155651_add_target_claim_leases/snapshot.json b/packages/database/drizzle/20261004155651_add_target_claim_leases/snapshot.json index 61991b250f..98e9358ec0 100644 --- a/packages/database/drizzle/20261004155651_add_target_claim_leases/snapshot.json +++ b/packages/database/drizzle/20261004155651_add_target_claim_leases/snapshot.json @@ -3,7 +3,6 @@ "dialect": "postgres", "id": "b842ea20-1be6-4ae9-9b04-58e92c04b451", "prevIds": [ - "4860d7e1-09ce-4eb2-9d69-62529ea3d3ac", "6910e6fe-7167-4fdc-8493-a5c74c8693e9" ], "ddl": [ @@ -49254,4 +49253,4 @@ } ], "renames": [] -} \ No newline at end of file +} diff --git a/packages/database/drizzle/20261005110425_add_integration_openai_workspace_unique/snapshot.json b/packages/database/drizzle/20261005110425_add_integration_openai_workspace_unique/snapshot.json index 3bea7717c5..99b2fe0d1d 100644 --- a/packages/database/drizzle/20261005110425_add_integration_openai_workspace_unique/snapshot.json +++ b/packages/database/drizzle/20261005110425_add_integration_openai_workspace_unique/snapshot.json @@ -3,7 +3,7 @@ "dialect": "postgres", "id": "e2ba6134-45b2-4db8-a4fb-01901251118c", "prevIds": [ - "b842ea20-1be6-4ae9-9b04-58e92c04b451" + "31be9278-7dc3-438c-a09e-ccf0461696c1" ], "ddl": [ { @@ -49274,4 +49274,4 @@ } ], "renames": [] -} \ No newline at end of file +} diff --git a/packages/database/drizzle/20261005154644_add_decision_foundation/snapshot.json b/packages/database/drizzle/20261005154644_add_decision_foundation/snapshot.json index ddf39c8a21..97088e84c1 100644 --- a/packages/database/drizzle/20261005154644_add_decision_foundation/snapshot.json +++ b/packages/database/drizzle/20261005154644_add_decision_foundation/snapshot.json @@ -3,8 +3,7 @@ "dialect": "postgres", "id": "20b14807-5c10-4aae-a20e-025c4c6ca9b5", "prevIds": [ - "85c1b547-6888-45be-970f-d271ec07f0ad", - "b842ea20-1be6-4ae9-9b04-58e92c04b451" + "e2ba6134-45b2-4db8-a4fb-01901251118c" ], "ddl": [ { @@ -13127,8 +13126,8 @@ "schema": "public", "table": "DecisionProfile" }, - { - "type": "jsonb", + { + "type": "jsonb", "typeSchema": null, "notNull": true, "dimensions": 0, @@ -13138,21 +13137,21 @@ "name": "contract", "entityType": "columns", "schema": "public", - "table": "DecisionProfile" - }, - { - "type": "jsonb", - "typeSchema": null, - "notNull": false, - "dimensions": 0, - "default": null, - "generated": null, - "identity": null, - "name": "thresholdConfig", - "entityType": "columns", - "schema": "public", - "table": "DecisionProfile" - }, + "table": "DecisionProfile" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thresholdConfig", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, { "type": "bigint", "typeSchema": null, @@ -30173,11 +30172,11 @@ "schema": "public", "table": "ShardTimeRange" }, - { - "nameExplicit": true, - "columns": [ - { - "value": "workspaceId", + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", "isExpression": false, "asc": true, "nullsFirst": false, @@ -35057,30 +35056,30 @@ "concurrently": false, "name": "DecisionProfile_workspaceId_idx", "entityType": "indexes", - "schema": "public", - "table": "DecisionProfile" - }, - { - "nameExplicit": true, - "columns": [ - { - "value": "connectionId", - "isExpression": false, - "asc": true, - "nullsFirst": false, - "opclass": null - } - ], - "isUnique": false, - "where": null, - "with": "", - "method": "btree", - "concurrently": false, - "name": "DecisionProfile_connectionId_idx", - "entityType": "indexes", - "schema": "public", - "table": "DecisionProfile" - }, + "schema": "public", + "table": "DecisionProfile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "connectionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_connectionId_idx", + "entityType": "indexes", + "schema": "public", + "table": "DecisionProfile" + }, { "nameExplicit": true, "columns": [ diff --git a/packages/database/drizzle/20261007093130_add_reflink_widget_branding/snapshot.json b/packages/database/drizzle/20261007093130_add_reflink_widget_branding/snapshot.json index e6410a61a7..1ccef78ce3 100644 --- a/packages/database/drizzle/20261007093130_add_reflink_widget_branding/snapshot.json +++ b/packages/database/drizzle/20261007093130_add_reflink_widget_branding/snapshot.json @@ -3,8 +3,7 @@ "dialect": "postgres", "id": "d086da49-090d-48b5-b61d-4e3c63ab0d70", "prevIds": [ - "31be9278-7dc3-438c-a09e-ccf0461696c1", - "e2ba6134-45b2-4db8-a4fb-01901251118c" + "20b14807-5c10-4aae-a20e-025c4c6ca9b5" ], "ddl": [ { @@ -49357,4 +49356,4 @@ } ], "renames": [] -} \ No newline at end of file +} diff --git a/packages/database/drizzle/20261012135508_add_custom_field_decision_context_opt_in/snapshot.json b/packages/database/drizzle/20261012135508_add_custom_field_decision_context_opt_in/snapshot.json index f4fa9635ea..c75c651f98 100644 --- a/packages/database/drizzle/20261012135508_add_custom_field_decision_context_opt_in/snapshot.json +++ b/packages/database/drizzle/20261012135508_add_custom_field_decision_context_opt_in/snapshot.json @@ -3,8 +3,7 @@ "dialect": "postgres", "id": "1743a55e-400f-4994-a1ed-c285dbf2e55a", "prevIds": [ - "20b14807-5c10-4aae-a20e-025c4c6ca9b5", - "a09ed26e-6f5c-4cc6-a1af-7eb3a535b6be" + "d98f261b-c7cf-4dad-ad73-e1b81501a3fe" ], "ddl": [ { diff --git a/packages/database/drizzle/20261012155852_drop_facebook_lead_ads_automation_flow_id/snapshot.json b/packages/database/drizzle/20261012155852_drop_facebook_lead_ads_automation_flow_id/snapshot.json index 19c2e3464e..1853f35877 100644 --- a/packages/database/drizzle/20261012155852_drop_facebook_lead_ads_automation_flow_id/snapshot.json +++ b/packages/database/drizzle/20261012155852_drop_facebook_lead_ads_automation_flow_id/snapshot.json @@ -3,7 +3,7 @@ "dialect": "postgres", "id": "2dbd145e-e075-4f94-a8be-cc77342ed529", "prevIds": [ - "d98f261b-c7cf-4dad-ad73-e1b81501a3fe" + "1743a55e-400f-4994-a1ed-c285dbf2e55a" ], "ddl": [ { @@ -51880,4 +51880,4 @@ } ], "renames": [] -} \ No newline at end of file +} diff --git a/packages/database/drizzle/20261013051918_add_attachment_keep_original/snapshot.json b/packages/database/drizzle/20261013051918_add_attachment_keep_original/snapshot.json index 3f9201c01a..7bbb1edcfa 100644 --- a/packages/database/drizzle/20261013051918_add_attachment_keep_original/snapshot.json +++ b/packages/database/drizzle/20261013051918_add_attachment_keep_original/snapshot.json @@ -3,7 +3,7 @@ "dialect": "postgres", "id": "15353b77-f187-4c27-94d7-11a69acb3a39", "prevIds": [ - "e05ed887-8290-44fd-9d2d-2fa89a25ce6f" + "d6148376-ca76-4971-b786-46d2547ff0c0" ], "ddl": [ { @@ -51666,4 +51666,4 @@ } ], "renames": [] -} \ No newline at end of file +} diff --git a/packages/database/drizzle/20261013120000_widen_broadcast_occurrence_slot_key/snapshot.json b/packages/database/drizzle/20261013120000_widen_broadcast_occurrence_slot_key/snapshot.json index 447ac0cb79..66f8c7a662 100644 --- a/packages/database/drizzle/20261013120000_widen_broadcast_occurrence_slot_key/snapshot.json +++ b/packages/database/drizzle/20261013120000_widen_broadcast_occurrence_slot_key/snapshot.json @@ -3,7 +3,7 @@ "dialect": "postgres", "id": "011e0504-d961-46f5-abed-fb43f7965998", "prevIds": [ - "d6148376-ca76-4971-b786-46d2547ff0c0" + "15353b77-f187-4c27-94d7-11a69acb3a39" ], "ddl": [ { @@ -52589,4 +52589,4 @@ } ], "renames": [] -} \ No newline at end of file +} diff --git a/packages/database/drizzle/20261016131625_add_inbox_to_analytics_events/snapshot.json b/packages/database/drizzle/20261016131625_add_inbox_to_analytics_events/snapshot.json index ccb7c1e814..ad42f6fa34 100644 --- a/packages/database/drizzle/20261016131625_add_inbox_to_analytics_events/snapshot.json +++ b/packages/database/drizzle/20261016131625_add_inbox_to_analytics_events/snapshot.json @@ -55158,4 +55158,4 @@ } ], "renames": [] -} \ No newline at end of file +} diff --git a/packages/database/drizzle/20261017032944_add_decision_profile_global_router/snapshot.json b/packages/database/drizzle/20261017032944_add_decision_profile_global_router/snapshot.json index 4e06bb2504..2790979e28 100644 --- a/packages/database/drizzle/20261017032944_add_decision_profile_global_router/snapshot.json +++ b/packages/database/drizzle/20261017032944_add_decision_profile_global_router/snapshot.json @@ -3,7 +3,7 @@ "dialect": "postgres", "id": "d58fa2c5-f293-434e-ab14-6714e6e264c3", "prevIds": [ - "1743a55e-400f-4994-a1ed-c285dbf2e55a" + "d40b0c44-5d43-4871-8cbc-425e3f6de01d" ], "ddl": [ { diff --git a/packages/database/drizzle/20261018080214_add_saved_reply_images/snapshot.json b/packages/database/drizzle/20261018080214_add_saved_reply_images/snapshot.json index b477755b66..91810bb4a5 100644 --- a/packages/database/drizzle/20261018080214_add_saved_reply_images/snapshot.json +++ b/packages/database/drizzle/20261018080214_add_saved_reply_images/snapshot.json @@ -3,7 +3,6 @@ "dialect": "postgres", "id": "f5221104-75a1-41c6-9680-2e13ee68f614", "prevIds": [ - "d40b0c44-5d43-4871-8cbc-425e3f6de01d", "d58fa2c5-f293-434e-ab14-6714e6e264c3" ], "ddl": [ @@ -55985,4 +55984,4 @@ } ], "renames": [] -} \ No newline at end of file +} diff --git a/packages/database/drizzle/20261019101422_add_platform_admin/snapshot.json b/packages/database/drizzle/20261019101422_add_platform_admin/snapshot.json index db8d8fe9f0..79748022e6 100644 --- a/packages/database/drizzle/20261019101422_add_platform_admin/snapshot.json +++ b/packages/database/drizzle/20261019101422_add_platform_admin/snapshot.json @@ -3,7 +3,7 @@ "dialect": "postgres", "id": "cacc013e-a5e7-4a43-bca9-f8279eeaaf69", "prevIds": [ - "797ff57e-73e6-4078-b781-47d2c134f823" + "ef97037c-2791-40cb-ba1c-00e48e51652a" ], "ddl": [ { @@ -56910,4 +56910,4 @@ } ], "renames": [] -} \ No newline at end of file +} diff --git a/packages/database/drizzle/20261020081842_add_license/snapshot.json b/packages/database/drizzle/20261020081842_add_license/snapshot.json index 09e98b31eb..eaa445cb78 100644 --- a/packages/database/drizzle/20261020081842_add_license/snapshot.json +++ b/packages/database/drizzle/20261020081842_add_license/snapshot.json @@ -3,8 +3,7 @@ "dialect": "postgres", "id": "1a1f6ff7-a96e-4b65-9225-5309da444b4a", "prevIds": [ - "cacc013e-a5e7-4a43-bca9-f8279eeaaf69", - "ef97037c-2791-40cb-ba1c-00e48e51652a" + "cacc013e-a5e7-4a43-bca9-f8279eeaaf69" ], "ddl": [ { @@ -57521,4 +57520,4 @@ } ], "renames": [] -} \ No newline at end of file +} diff --git a/packages/database/drizzle/20261023001528_contact_activity_store/snapshot.json b/packages/database/drizzle/20261023001528_contact_activity_store/snapshot.json index 06a377e9dc..bd6708652d 100644 --- a/packages/database/drizzle/20261023001528_contact_activity_store/snapshot.json +++ b/packages/database/drizzle/20261023001528_contact_activity_store/snapshot.json @@ -3,7 +3,7 @@ "dialect": "postgres", "id": "335fec36-c7cc-45ef-ab96-7b8d7cea12d9", "prevIds": [ - "1a1f6ff7-a96e-4b65-9225-5309da444b4a" + "4b3a5851-1efd-4345-b420-c0de0e154401" ], "ddl": [ { @@ -57983,4 +57983,4 @@ } ], "renames": [] -} \ No newline at end of file +} diff --git a/packages/database/drizzle/20261023162208_ecommerce/snapshot.json b/packages/database/drizzle/20261023162208_ecommerce/snapshot.json index 2fe635bcfc..12d9ee4eda 100644 --- a/packages/database/drizzle/20261023162208_ecommerce/snapshot.json +++ b/packages/database/drizzle/20261023162208_ecommerce/snapshot.json @@ -3,8 +3,7 @@ "dialect": "postgres", "id": "edf6de11-00e6-44b1-8ce9-4a886d9a7a65", "prevIds": [ - "15353b77-f187-4c27-94d7-11a69acb3a39", - "4b3a5851-1efd-4345-b420-c0de0e154401" + "335fec36-c7cc-45ef-ab96-7b8d7cea12d9" ], "ddl": [ { @@ -61602,4 +61601,4 @@ } ], "renames": [] -} \ No newline at end of file +} diff --git a/packages/database/drizzle/20261025020711_add_workspace_purge_partitioned_indexes/migration.sql b/packages/database/drizzle/20261025020711_add_workspace_purge_partitioned_indexes/migration.sql new file mode 100644 index 0000000000..5be8616d25 --- /dev/null +++ b/packages/database/drizzle/20261025020711_add_workspace_purge_partitioned_indexes/migration.sql @@ -0,0 +1,533 @@ +-- Build "ContactOnBroadcast_conversationId_idx" without locking writes across all 64 HASH partitions. +-- PostgreSQL cannot create a partitioned index concurrently, so each child is +-- built concurrently then attached to an ON ONLY parent index. +DO $$ +DECLARE + child_oid oid; + parent_oid oid := to_regclass('"ContactOnBroadcast_conversationId_idx"'); +BEGIN + FOR i IN 0..63 LOOP + child_oid := to_regclass(format('"ContactOnBroadcast_p%s_conversationId_idx"', i)); + IF child_oid IS NOT NULL + AND EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = child_oid AND NOT indisvalid) + AND ( + parent_oid IS NULL + OR NOT EXISTS ( + SELECT 1 FROM pg_inherits WHERE inhrelid = child_oid AND inhparent = parent_oid + ) + ) + THEN + EXECUTE format('DROP INDEX IF EXISTS "ContactOnBroadcast_p%s_conversationId_idx"', i); + END IF; + END LOOP; +END $$; +--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "ContactOnBroadcast_conversationId_idx" ON ONLY "ContactOnBroadcast" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p0_conversationId_idx" ON "ContactOnBroadcast_p0" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p1_conversationId_idx" ON "ContactOnBroadcast_p1" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p2_conversationId_idx" ON "ContactOnBroadcast_p2" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p3_conversationId_idx" ON "ContactOnBroadcast_p3" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p4_conversationId_idx" ON "ContactOnBroadcast_p4" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p5_conversationId_idx" ON "ContactOnBroadcast_p5" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p6_conversationId_idx" ON "ContactOnBroadcast_p6" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p7_conversationId_idx" ON "ContactOnBroadcast_p7" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p8_conversationId_idx" ON "ContactOnBroadcast_p8" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p9_conversationId_idx" ON "ContactOnBroadcast_p9" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p10_conversationId_idx" ON "ContactOnBroadcast_p10" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p11_conversationId_idx" ON "ContactOnBroadcast_p11" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p12_conversationId_idx" ON "ContactOnBroadcast_p12" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p13_conversationId_idx" ON "ContactOnBroadcast_p13" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p14_conversationId_idx" ON "ContactOnBroadcast_p14" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p15_conversationId_idx" ON "ContactOnBroadcast_p15" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p16_conversationId_idx" ON "ContactOnBroadcast_p16" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p17_conversationId_idx" ON "ContactOnBroadcast_p17" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p18_conversationId_idx" ON "ContactOnBroadcast_p18" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p19_conversationId_idx" ON "ContactOnBroadcast_p19" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p20_conversationId_idx" ON "ContactOnBroadcast_p20" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p21_conversationId_idx" ON "ContactOnBroadcast_p21" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p22_conversationId_idx" ON "ContactOnBroadcast_p22" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p23_conversationId_idx" ON "ContactOnBroadcast_p23" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p24_conversationId_idx" ON "ContactOnBroadcast_p24" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p25_conversationId_idx" ON "ContactOnBroadcast_p25" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p26_conversationId_idx" ON "ContactOnBroadcast_p26" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p27_conversationId_idx" ON "ContactOnBroadcast_p27" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p28_conversationId_idx" ON "ContactOnBroadcast_p28" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p29_conversationId_idx" ON "ContactOnBroadcast_p29" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p30_conversationId_idx" ON "ContactOnBroadcast_p30" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p31_conversationId_idx" ON "ContactOnBroadcast_p31" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p32_conversationId_idx" ON "ContactOnBroadcast_p32" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p33_conversationId_idx" ON "ContactOnBroadcast_p33" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p34_conversationId_idx" ON "ContactOnBroadcast_p34" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p35_conversationId_idx" ON "ContactOnBroadcast_p35" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p36_conversationId_idx" ON "ContactOnBroadcast_p36" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p37_conversationId_idx" ON "ContactOnBroadcast_p37" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p38_conversationId_idx" ON "ContactOnBroadcast_p38" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p39_conversationId_idx" ON "ContactOnBroadcast_p39" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p40_conversationId_idx" ON "ContactOnBroadcast_p40" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p41_conversationId_idx" ON "ContactOnBroadcast_p41" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p42_conversationId_idx" ON "ContactOnBroadcast_p42" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p43_conversationId_idx" ON "ContactOnBroadcast_p43" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p44_conversationId_idx" ON "ContactOnBroadcast_p44" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p45_conversationId_idx" ON "ContactOnBroadcast_p45" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p46_conversationId_idx" ON "ContactOnBroadcast_p46" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p47_conversationId_idx" ON "ContactOnBroadcast_p47" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p48_conversationId_idx" ON "ContactOnBroadcast_p48" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p49_conversationId_idx" ON "ContactOnBroadcast_p49" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p50_conversationId_idx" ON "ContactOnBroadcast_p50" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p51_conversationId_idx" ON "ContactOnBroadcast_p51" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p52_conversationId_idx" ON "ContactOnBroadcast_p52" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p53_conversationId_idx" ON "ContactOnBroadcast_p53" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p54_conversationId_idx" ON "ContactOnBroadcast_p54" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p55_conversationId_idx" ON "ContactOnBroadcast_p55" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p56_conversationId_idx" ON "ContactOnBroadcast_p56" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p57_conversationId_idx" ON "ContactOnBroadcast_p57" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p58_conversationId_idx" ON "ContactOnBroadcast_p58" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p59_conversationId_idx" ON "ContactOnBroadcast_p59" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p60_conversationId_idx" ON "ContactOnBroadcast_p60" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p61_conversationId_idx" ON "ContactOnBroadcast_p61" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p62_conversationId_idx" ON "ContactOnBroadcast_p62" USING btree ("conversationId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactOnBroadcast_p63_conversationId_idx" ON "ContactOnBroadcast_p63" USING btree ("conversationId"); +--> statement-breakpoint +DO $$ +DECLARE + child_name text; +BEGIN + FOR i IN 0..63 LOOP + child_name := format('ContactOnBroadcast_p%s_conversationId_idx', i); + IF NOT EXISTS ( + SELECT 1 FROM pg_inherits + WHERE inhrelid = to_regclass(format('"%s"', child_name)) + AND inhparent = to_regclass('"ContactOnBroadcast_conversationId_idx"') + ) THEN + EXECUTE format('ALTER INDEX "ContactOnBroadcast_conversationId_idx" ATTACH PARTITION %I', child_name); + END IF; + END LOOP; +END $$; +--> statement-breakpoint +DO $$ +BEGIN + IF NOT (SELECT indisvalid FROM pg_index WHERE indexrelid = '"ContactOnBroadcast_conversationId_idx"'::regclass) THEN + RAISE EXCEPTION 'ContactOnBroadcast_conversationId_idx is not valid after attaching all partitions'; + END IF; +END $$; +--> statement-breakpoint + +-- Build "SequenceDispatch_sequenceId_idx" without locking writes across all 64 HASH partitions. +-- PostgreSQL cannot create a partitioned index concurrently, so each child is +-- built concurrently then attached to an ON ONLY parent index. +DO $$ +DECLARE + child_oid oid; + parent_oid oid := to_regclass('"SequenceDispatch_sequenceId_idx"'); +BEGIN + FOR i IN 0..63 LOOP + child_oid := to_regclass(format('"SequenceDispatch_p%s_sequenceId_idx"', i)); + IF child_oid IS NOT NULL + AND EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = child_oid AND NOT indisvalid) + AND ( + parent_oid IS NULL + OR NOT EXISTS ( + SELECT 1 FROM pg_inherits WHERE inhrelid = child_oid AND inhparent = parent_oid + ) + ) + THEN + EXECUTE format('DROP INDEX IF EXISTS "SequenceDispatch_p%s_sequenceId_idx"', i); + END IF; + END LOOP; +END $$; +--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "SequenceDispatch_sequenceId_idx" ON ONLY "SequenceDispatch" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p0_sequenceId_idx" ON "SequenceDispatch_p0" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p1_sequenceId_idx" ON "SequenceDispatch_p1" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p2_sequenceId_idx" ON "SequenceDispatch_p2" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p3_sequenceId_idx" ON "SequenceDispatch_p3" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p4_sequenceId_idx" ON "SequenceDispatch_p4" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p5_sequenceId_idx" ON "SequenceDispatch_p5" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p6_sequenceId_idx" ON "SequenceDispatch_p6" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p7_sequenceId_idx" ON "SequenceDispatch_p7" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p8_sequenceId_idx" ON "SequenceDispatch_p8" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p9_sequenceId_idx" ON "SequenceDispatch_p9" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p10_sequenceId_idx" ON "SequenceDispatch_p10" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p11_sequenceId_idx" ON "SequenceDispatch_p11" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p12_sequenceId_idx" ON "SequenceDispatch_p12" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p13_sequenceId_idx" ON "SequenceDispatch_p13" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p14_sequenceId_idx" ON "SequenceDispatch_p14" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p15_sequenceId_idx" ON "SequenceDispatch_p15" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p16_sequenceId_idx" ON "SequenceDispatch_p16" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p17_sequenceId_idx" ON "SequenceDispatch_p17" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p18_sequenceId_idx" ON "SequenceDispatch_p18" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p19_sequenceId_idx" ON "SequenceDispatch_p19" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p20_sequenceId_idx" ON "SequenceDispatch_p20" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p21_sequenceId_idx" ON "SequenceDispatch_p21" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p22_sequenceId_idx" ON "SequenceDispatch_p22" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p23_sequenceId_idx" ON "SequenceDispatch_p23" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p24_sequenceId_idx" ON "SequenceDispatch_p24" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p25_sequenceId_idx" ON "SequenceDispatch_p25" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p26_sequenceId_idx" ON "SequenceDispatch_p26" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p27_sequenceId_idx" ON "SequenceDispatch_p27" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p28_sequenceId_idx" ON "SequenceDispatch_p28" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p29_sequenceId_idx" ON "SequenceDispatch_p29" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p30_sequenceId_idx" ON "SequenceDispatch_p30" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p31_sequenceId_idx" ON "SequenceDispatch_p31" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p32_sequenceId_idx" ON "SequenceDispatch_p32" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p33_sequenceId_idx" ON "SequenceDispatch_p33" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p34_sequenceId_idx" ON "SequenceDispatch_p34" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p35_sequenceId_idx" ON "SequenceDispatch_p35" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p36_sequenceId_idx" ON "SequenceDispatch_p36" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p37_sequenceId_idx" ON "SequenceDispatch_p37" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p38_sequenceId_idx" ON "SequenceDispatch_p38" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p39_sequenceId_idx" ON "SequenceDispatch_p39" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p40_sequenceId_idx" ON "SequenceDispatch_p40" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p41_sequenceId_idx" ON "SequenceDispatch_p41" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p42_sequenceId_idx" ON "SequenceDispatch_p42" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p43_sequenceId_idx" ON "SequenceDispatch_p43" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p44_sequenceId_idx" ON "SequenceDispatch_p44" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p45_sequenceId_idx" ON "SequenceDispatch_p45" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p46_sequenceId_idx" ON "SequenceDispatch_p46" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p47_sequenceId_idx" ON "SequenceDispatch_p47" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p48_sequenceId_idx" ON "SequenceDispatch_p48" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p49_sequenceId_idx" ON "SequenceDispatch_p49" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p50_sequenceId_idx" ON "SequenceDispatch_p50" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p51_sequenceId_idx" ON "SequenceDispatch_p51" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p52_sequenceId_idx" ON "SequenceDispatch_p52" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p53_sequenceId_idx" ON "SequenceDispatch_p53" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p54_sequenceId_idx" ON "SequenceDispatch_p54" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p55_sequenceId_idx" ON "SequenceDispatch_p55" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p56_sequenceId_idx" ON "SequenceDispatch_p56" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p57_sequenceId_idx" ON "SequenceDispatch_p57" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p58_sequenceId_idx" ON "SequenceDispatch_p58" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p59_sequenceId_idx" ON "SequenceDispatch_p59" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p60_sequenceId_idx" ON "SequenceDispatch_p60" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p61_sequenceId_idx" ON "SequenceDispatch_p61" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p62_sequenceId_idx" ON "SequenceDispatch_p62" USING btree ("sequenceId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p63_sequenceId_idx" ON "SequenceDispatch_p63" USING btree ("sequenceId"); +--> statement-breakpoint +DO $$ +DECLARE + child_name text; +BEGIN + FOR i IN 0..63 LOOP + child_name := format('SequenceDispatch_p%s_sequenceId_idx', i); + IF NOT EXISTS ( + SELECT 1 FROM pg_inherits + WHERE inhrelid = to_regclass(format('"%s"', child_name)) + AND inhparent = to_regclass('"SequenceDispatch_sequenceId_idx"') + ) THEN + EXECUTE format('ALTER INDEX "SequenceDispatch_sequenceId_idx" ATTACH PARTITION %I', child_name); + END IF; + END LOOP; +END $$; +--> statement-breakpoint +DO $$ +BEGIN + IF NOT (SELECT indisvalid FROM pg_index WHERE indexrelid = '"SequenceDispatch_sequenceId_idx"'::regclass) THEN + RAISE EXCEPTION 'SequenceDispatch_sequenceId_idx is not valid after attaching all partitions'; + END IF; +END $$; +--> statement-breakpoint + +-- Build "SequenceDispatch_stepId_idx" without locking writes across all 64 HASH partitions. +-- PostgreSQL cannot create a partitioned index concurrently, so each child is +-- built concurrently then attached to an ON ONLY parent index. +DO $$ +DECLARE + child_oid oid; + parent_oid oid := to_regclass('"SequenceDispatch_stepId_idx"'); +BEGIN + FOR i IN 0..63 LOOP + child_oid := to_regclass(format('"SequenceDispatch_p%s_stepId_idx"', i)); + IF child_oid IS NOT NULL + AND EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = child_oid AND NOT indisvalid) + AND ( + parent_oid IS NULL + OR NOT EXISTS ( + SELECT 1 FROM pg_inherits WHERE inhrelid = child_oid AND inhparent = parent_oid + ) + ) + THEN + EXECUTE format('DROP INDEX IF EXISTS "SequenceDispatch_p%s_stepId_idx"', i); + END IF; + END LOOP; +END $$; +--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "SequenceDispatch_stepId_idx" ON ONLY "SequenceDispatch" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p0_stepId_idx" ON "SequenceDispatch_p0" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p1_stepId_idx" ON "SequenceDispatch_p1" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p2_stepId_idx" ON "SequenceDispatch_p2" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p3_stepId_idx" ON "SequenceDispatch_p3" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p4_stepId_idx" ON "SequenceDispatch_p4" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p5_stepId_idx" ON "SequenceDispatch_p5" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p6_stepId_idx" ON "SequenceDispatch_p6" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p7_stepId_idx" ON "SequenceDispatch_p7" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p8_stepId_idx" ON "SequenceDispatch_p8" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p9_stepId_idx" ON "SequenceDispatch_p9" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p10_stepId_idx" ON "SequenceDispatch_p10" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p11_stepId_idx" ON "SequenceDispatch_p11" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p12_stepId_idx" ON "SequenceDispatch_p12" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p13_stepId_idx" ON "SequenceDispatch_p13" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p14_stepId_idx" ON "SequenceDispatch_p14" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p15_stepId_idx" ON "SequenceDispatch_p15" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p16_stepId_idx" ON "SequenceDispatch_p16" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p17_stepId_idx" ON "SequenceDispatch_p17" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p18_stepId_idx" ON "SequenceDispatch_p18" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p19_stepId_idx" ON "SequenceDispatch_p19" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p20_stepId_idx" ON "SequenceDispatch_p20" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p21_stepId_idx" ON "SequenceDispatch_p21" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p22_stepId_idx" ON "SequenceDispatch_p22" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p23_stepId_idx" ON "SequenceDispatch_p23" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p24_stepId_idx" ON "SequenceDispatch_p24" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p25_stepId_idx" ON "SequenceDispatch_p25" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p26_stepId_idx" ON "SequenceDispatch_p26" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p27_stepId_idx" ON "SequenceDispatch_p27" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p28_stepId_idx" ON "SequenceDispatch_p28" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p29_stepId_idx" ON "SequenceDispatch_p29" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p30_stepId_idx" ON "SequenceDispatch_p30" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p31_stepId_idx" ON "SequenceDispatch_p31" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p32_stepId_idx" ON "SequenceDispatch_p32" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p33_stepId_idx" ON "SequenceDispatch_p33" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p34_stepId_idx" ON "SequenceDispatch_p34" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p35_stepId_idx" ON "SequenceDispatch_p35" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p36_stepId_idx" ON "SequenceDispatch_p36" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p37_stepId_idx" ON "SequenceDispatch_p37" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p38_stepId_idx" ON "SequenceDispatch_p38" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p39_stepId_idx" ON "SequenceDispatch_p39" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p40_stepId_idx" ON "SequenceDispatch_p40" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p41_stepId_idx" ON "SequenceDispatch_p41" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p42_stepId_idx" ON "SequenceDispatch_p42" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p43_stepId_idx" ON "SequenceDispatch_p43" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p44_stepId_idx" ON "SequenceDispatch_p44" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p45_stepId_idx" ON "SequenceDispatch_p45" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p46_stepId_idx" ON "SequenceDispatch_p46" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p47_stepId_idx" ON "SequenceDispatch_p47" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p48_stepId_idx" ON "SequenceDispatch_p48" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p49_stepId_idx" ON "SequenceDispatch_p49" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p50_stepId_idx" ON "SequenceDispatch_p50" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p51_stepId_idx" ON "SequenceDispatch_p51" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p52_stepId_idx" ON "SequenceDispatch_p52" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p53_stepId_idx" ON "SequenceDispatch_p53" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p54_stepId_idx" ON "SequenceDispatch_p54" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p55_stepId_idx" ON "SequenceDispatch_p55" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p56_stepId_idx" ON "SequenceDispatch_p56" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p57_stepId_idx" ON "SequenceDispatch_p57" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p58_stepId_idx" ON "SequenceDispatch_p58" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p59_stepId_idx" ON "SequenceDispatch_p59" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p60_stepId_idx" ON "SequenceDispatch_p60" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p61_stepId_idx" ON "SequenceDispatch_p61" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p62_stepId_idx" ON "SequenceDispatch_p62" USING btree ("stepId"); +--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SequenceDispatch_p63_stepId_idx" ON "SequenceDispatch_p63" USING btree ("stepId"); +--> statement-breakpoint +DO $$ +DECLARE + child_name text; +BEGIN + FOR i IN 0..63 LOOP + child_name := format('SequenceDispatch_p%s_stepId_idx', i); + IF NOT EXISTS ( + SELECT 1 FROM pg_inherits + WHERE inhrelid = to_regclass(format('"%s"', child_name)) + AND inhparent = to_regclass('"SequenceDispatch_stepId_idx"') + ) THEN + EXECUTE format('ALTER INDEX "SequenceDispatch_stepId_idx" ATTACH PARTITION %I', child_name); + END IF; + END LOOP; +END $$; +--> statement-breakpoint +DO $$ +BEGIN + IF NOT (SELECT indisvalid FROM pg_index WHERE indexrelid = '"SequenceDispatch_stepId_idx"'::regclass) THEN + RAISE EXCEPTION 'SequenceDispatch_stepId_idx is not valid after attaching all partitions'; + END IF; +END $$; +--> statement-breakpoint diff --git a/packages/database/drizzle/20261025020711_add_workspace_purge_partitioned_indexes/snapshot.json b/packages/database/drizzle/20261025020711_add_workspace_purge_partitioned_indexes/snapshot.json new file mode 100644 index 0000000000..ab6933e83e --- /dev/null +++ b/packages/database/drizzle/20261025020711_add_workspace_purge_partitioned_indexes/snapshot.json @@ -0,0 +1,62067 @@ +{ + "id": "9ca0f238-71f7-4aba-a8a8-8bdc3b0bb367", + "prevIds": [ + "edf6de11-00e6-44b1-8ce9-4a886d9a7a65" + ], + "version": "8", + "dialect": "postgres", + "ddl": [ + { + "schema": "public", + "values": [ + "pending", + "sent", + "failed", + "skipped_no_scope", + "skipped_region" + ], + "name": "adsConversionCapiStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "automatic", + "rule", + "trigger" + ], + "name": "adsConversionEventSource", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "whatsapp", + "facebook", + "messenger", + "instagram" + ], + "name": "adsConversionChannel", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "lead", + "purchase" + ], + "name": "adsConversionEventType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "success", + "error", + "processing" + ], + "name": "aiConversationEmbeddingStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "processing", + "success", + "error" + ], + "name": "aiConversationSourceStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "document", + "image", + "url", + "web_search" + ], + "name": "aiConversationSourceType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "success", + "error", + "processing" + ], + "name": "aiEmbeddingStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "enable", + "disable" + ], + "name": "aiHandoverBulkAction", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "running", + "cancelling", + "completed", + "failed", + "cancelled" + ], + "name": "aiHandoverBulkStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "automated_response", + "ai_agent", + "flow", + "none" + ], + "name": "analyticsBotResponseType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "success", + "fallback" + ], + "name": "analyticsBotResult", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "flow", + "agent", + "fallback" + ], + "name": "analyticsBotRouteType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "message:sent", + "message:delivered", + "message:seen", + "message:failed", + "flow:clicked" + ], + "name": "analyticsBroadcastEventType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "contact_created", + "contact_deleted", + "contact_blocked" + ], + "name": "analyticsContactEventType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "bot", + "human" + ], + "name": "analyticsContactSenderType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "conversation_created", + "conversation_assigned", + "conversation_unassigned", + "conversation_transferred_to_human", + "conversation_transferred_to_bot", + "conversation_followed", + "conversation_unfollowed", + "conversation_archived", + "conversation_unarchived" + ], + "name": "analyticsConversationEventType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "message_human_sent", + "message_bot_sent" + ], + "name": "analyticsMessageEventType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "processing", + "ingested", + "failed" + ], + "name": "analyticsStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "synced", + "failed" + ], + "name": "appointmentExternalSyncStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "inPerson", + "phoneCall", + "onlineMeeting" + ], + "name": "appointmentLocationTypeSnapshot", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "scheduled", + "cancelled" + ], + "name": "appointmentStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "inPerson", + "phoneCall", + "onlineMeeting" + ], + "name": "appointmentLocationType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "rollingDays", + "dateRange", + "specificDay", + "anyFutureDate" + ], + "name": "appointmentScheduleWindowType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "minutes", + "hours", + "days" + ], + "name": "appointmentReminderTimingUnit", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "sent", + "cancelled", + "failed" + ], + "name": "appointmentReminderDispatchStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "image", + "video", + "audio", + "gif", + "file" + ], + "name": "fileType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "inbound", + "outbound" + ], + "name": "automatedResponseType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "defaultReply" + ], + "name": "automationThrottleType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "now", + "future", + "recurring" + ], + "name": "broadcastScheduleType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "scheduled", + "sent", + "sending", + "cancelled", + "draft", + "failed", + "recurring" + ], + "name": "broadcastStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "created", + "skipped", + "missed" + ], + "name": "broadcastOccurrenceOutcome", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "catchUpSuperseded", + "paused", + "draft", + "blockedOwner", + "planLimit", + "noTargets", + "undeliverable", + "excludedDate" + ], + "name": "broadcastOccurrenceReason", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "whatsapp", + "messenger", + "instagram" + ], + "name": "coexistChannel", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "contacts", + "messages" + ], + "name": "coexistMessengerSyncPhase", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "init", + "running", + "succeeded", + "failed", + "partial", + "waiting" + ], + "name": "coexistRunStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "coexist", + "contact_scan" + ], + "name": "coexistRunType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "messenger", + "instagram", + "instagramFacebook", + "threads", + "tiktok" + ], + "name": "commentAutomationType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "equal", + "contain" + ], + "name": "commentExcludeKeywordsType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "sent", + "failed" + ], + "name": "commentAutomationEventStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "public", + "private" + ], + "name": "commentAutomationReplyChannel", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "AIAgent", + "text", + "flow", + "none" + ], + "name": "commentAutomationReplyType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "outsideSchedule", + "postNotMatched", + "commentIsReply", + "keywordsNotMatched", + "mentionCountNotMatched", + "contactNotNew", + "alreadyRepliedOnPost", + "engagedOnOtherPost" + ], + "name": "commentAutomationMissReason", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "male", + "female", + "unknown" + ], + "name": "gender", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "captured", + "unavailable", + "failed" + ], + "name": "contactInboxProfileSnapshotState", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "text", + "location", + "refLink", + "image", + "video", + "audio", + "gif", + "file", + "storyMention" + ], + "name": "lastUserInputType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "inboundReceived", + "standbyReceived", + "controlPassed", + "controlTaken", + "taken", + "released", + "passed", + "serviceSent", + "serviceRejected" + ], + "name": "threadControlEvent", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "owned", + "standby", + "idle" + ], + "name": "threadControlState", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "scheduled", + "completed", + "failed", + "canceled" + ], + "name": "ContactOnSmartDelayStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "waitNode", + "followUp", + "quickReplyFollowUp" + ], + "name": "ContactOnSmartDelayType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "active", + "archived" + ], + "name": "couponTopicStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "shortText", + "email", + "phoneNumber", + "number", + "date", + "datetime", + "boolean", + "longText" + ], + "name": "customFieldType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "enabled", + "disabled" + ], + "name": "DecisionConnectionStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "passed", + "failed" + ], + "name": "DecisionConnectionTestStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "typesafe", + "systemOneCompatible", + "openrouterDecision" + ], + "name": "DecisionProviderKind", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "enabled", + "disabled" + ], + "name": "DecisionProfileStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "import", + "generic", + "export" + ], + "name": "fileContextType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "uploaded", + "failed" + ], + "name": "fileStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "tag", + "flow", + "customField", + "automatedResponse", + "trigger", + "webhook", + "sequence", + "emailTopic", + "fbComment", + "igComment", + "igStory", + "outboundAutomatedResponse" + ], + "name": "folderType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "gclid", + "gbraid" + ], + "name": "googleAdsClickIdType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "flowStep", + "triggerAction" + ], + "name": "googleAdsEventSource", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "sending", + "sent", + "processed", + "failed", + "skipped_no_account", + "skipped_expired" + ], + "name": "googleAdsEventStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "delivery", + "processing", + "timeout" + ], + "name": "googleAdsFailureStage", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "processing", + "success", + "partial_success", + "failed", + "unknown", + "timed_out" + ], + "name": "googleAdsProcessingStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "storyReply", + "storyMention" + ], + "name": "igStoryAutomationTrigger", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "instagram", + "instagramFacebook" + ], + "name": "igStoryAutomationType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "csv", + "xlsx", + "xls", + "json" + ], + "name": "importFormat", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "processing", + "completed", + "failed" + ], + "name": "importStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "contacts", + "coupons", + "products", + "flow" + ], + "name": "importType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "received", + "processing", + "processed", + "completedWithErrors", + "skipped", + "failed" + ], + "name": "inboundWebhookRequestStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "oauth", + "fbe" + ], + "name": "metaCatalogAuthMode", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "active", + "invalid" + ], + "name": "metaCatalogConnectionStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "idle", + "queued", + "running", + "succeeded", + "partial", + "failed" + ], + "name": "metaCatalogImportStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "metaNative", + "browserWhisper" + ], + "name": "whatsappCallRecordingMode", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "metaNative", + "browserWhisper" + ], + "name": "whatsappCallTranscriptionMode", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending_verification", + "registered", + "failed" + ], + "name": "whatsappRegistrationStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "messenger", + "instagram", + "whatsapp", + "zalo", + "telegram", + "tiktok", + "threads", + "email", + "gamification" + ], + "name": "leaderboardPlatform", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "draft", + "active", + "paused", + "finished" + ], + "name": "leaderboardStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "adjust", + "resetOne", + "resetAll", + "ban", + "unban" + ], + "name": "leaderboardAuditAction", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "rule", + "flow", + "referral", + "manual", + "reset" + ], + "name": "leaderboardScoreSource", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "text", + "location", + "refLink" + ], + "name": "contentType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "message", + "comment" + ], + "name": "messageKind", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "incoming", + "outgoing", + "activity" + ], + "name": "messageType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "bot", + "contact", + "system", + "user", + "api" + ], + "name": "senderType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "processing", + "completed", + "failed" + ], + "name": "MessageCleanupStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "whatsapp", + "messenger", + "instagram" + ], + "name": "messagingAdChannel", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "campaignCreated", + "adSetCreated", + "creativeCreated", + "adCreated", + "failed" + ], + "name": "messagingAdCreateState", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "draft", + "publishing", + "published", + "pausing", + "paused", + "deleting", + "deleted", + "publishFailed" + ], + "name": "messagingAdPublishState", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "push", + "import" + ], + "name": "metaCatalogItemDirection", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "all", + "category", + "selected" + ], + "name": "metaCatalogSyncScope", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "queued", + "running", + "succeeded", + "partial", + "failed" + ], + "name": "metaCatalogSyncStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "web" + ], + "name": "miniAppSubmissionSource", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "submitted" + ], + "name": "miniAppUploadStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "luckyWheel", + "jackpot", + "gashapon", + "drawLots", + "scratchOff" + ], + "name": "minigameType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "dont_track", + "track" + ], + "name": "inventoryPolicy", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "text", + "number", + "email", + "phone", + "multipleChoice", + "date", + "datetime", + "image", + "file", + "location", + "websiteLink" + ], + "name": "questionnaireQuestionType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "inProgress", + "completed", + "cancelled", + "failed", + "timeout" + ], + "name": "questionnaireSubmissionStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "refLink", + "qrCode" + ], + "name": "ReflinkType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "me" + ], + "name": "SystemFieldType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "creator", + "administrator", + "member", + "restricted", + "left", + "kicked" + ], + "name": "telegramBotChatStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "private", + "group", + "supergroup", + "channel" + ], + "name": "telegramChatType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "installing", + "completed", + "partial", + "failed" + ], + "name": "templateInstallationStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "flows", + "products", + "aiFunctions", + "aiAgents", + "calendars", + "webchats", + "keywords", + "entryPointLinks", + "triggers", + "fbCommentAutomations", + "settings", + "customFields", + "tags", + "productCategories" + ], + "name": "templateResourceCategory", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "ios", + "android" + ], + "name": "devicePlatform", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "userInitiated", + "businessInitiated" + ], + "name": "whatsappCallDirection", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "completed", + "failed", + "rejected", + "canceled" + ], + "name": "whatsappCallOutcome", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "ringing", + "accepted", + "rejected", + "completed", + "failed" + ], + "name": "whatsappCallStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "accept", + "reject" + ], + "name": "whatsappCallPermissionResponse", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "allTime", + "oncePerHour", + "oncePerDay" + ], + "name": "defaultReplyFrequency", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "full", + "read_only" + ], + "name": "WorkspaceApiTokenPermission", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "owner", + "agent" + ], + "name": "workspaceMemberRole", + "entityType": "enums" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MessageShard", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ShardTimeRange", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AdsConversionEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AdsConversionRule", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIAgent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIConversationEmbedding", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIConversationSource", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIEmbedding", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIFile", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIFunction", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIHandoverBulkRun", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIHandoverSettings", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIMCPServer", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsAgentResponseEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsBotMessageEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsBroadcastEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsContactEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsConversationEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsFlowNodeEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsMessageEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsSequenceEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsEmailTopic", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsManifestStatus", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Appointment", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AppointmentCalendar", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AppointmentCalendarAvailability", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AppointmentCalendarReminder", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AppointmentReminderDispatch", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Attachment", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Account", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Invitation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Jwk", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Session", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "User", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Verification", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AutomatedResponse", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AutomationThrottle", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "BotField", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Broadcast", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "BroadcastRecurrence", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "BroadcastRecurrenceOccurrence", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "BroadcastTarget", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ChannelPost", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CoexistSyncRun", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CommentAutomation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CommentAutomationEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CommentAutomationMiss", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CommentAutomationReply", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ConnectSession", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Connection", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Contact", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactActiveHourly", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactActiveMonthly", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactCustomField", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactInbox", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactInboxPost", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactNote", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactOnBroadcast", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactOnSequence", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactOnSmartDelay", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactToTag", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactToTagChannel", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Conversation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ConversationParticipant", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Coupon", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CouponTopic", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CustomField", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "DecisionConnection", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "DecisionProfile", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "DynamicImage", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "EmailTopic", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AuditLog", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CustomDomain", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "License", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "PlatformAdmin", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Tenant", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TenantHelpItem", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "UserQuota", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkspaceUsage", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ErrorLog", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ExternalWebhook", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FacebookLeadAdsAutomation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FacebookLeadAdsLead", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FacebookMarketingMessage", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FacebookMarketingMessagesAuth", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "File", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Flow", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FlowAnalyticsSession", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FlowNodeStat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FlowRun", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FlowVersion", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Folder", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "GoogleAdsConversionEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "GoogleAdsSettings", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IgStoryAutomation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Import", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "InboundWebhook", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "InboundWebhookRequest", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Inbox", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "InboxContactStat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "InboxTeam", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "InboxTeamMember", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationActiveCampaign", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationApi", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Integration", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationClaude", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationDeepseek", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationDrip", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationFacebookAds", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationGemini", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationGetResponse", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationGoogleAds", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationGoogleCalendar", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationGoogleSheet", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationInstagram", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationKlaviyo", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationMailchimp", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationMailerLite", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationMessenger", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationMetaCatalog", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationMoosend", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationOpenai", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationOpenaiCompatible", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationOpenrouter", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationOutlookCalendar", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationSendGrid", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationSmtp", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationTelegram", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationThreads", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationTiktok", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationWebchat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationWhatsapp", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationZalo", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Leaderboard", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "LeaderboardAuditLog", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "LeaderboardParticipant", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "LeaderboardScoreEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MagicLink", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MagicLinkStat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MediaLibraryFile", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MediaLibraryFolder", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Message", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MessageCleanup", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MessagingAdOperation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MessagingAdsConnection", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MessengerMessageTemplate", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MessengerWelcomeMessageFlow", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MetaCapiEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MetaCatalogItem", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MetaCatalogSyncRun", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MiniApp", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MiniAppPublication", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MiniAppSubmission", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MiniAppUpload", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Minigame", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MinigameContact", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MinigamePlay", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "PlatformCredential", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Product", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ProductAddon", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ProductCategory", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ProductVariant", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ProductVariantOption", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "QuestionnaireAnswer", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Questionnaire", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "QuestionnaireQuestion", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "QuestionnaireSubmission", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "RefLinkStat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Reflink", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ResponseSlaPolicy", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "SavedReply", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "SavedReplyImage", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Sequence", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "SequenceDispatch", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "SequenceStep", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Spreadsheet", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "SystemField", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Tag", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TagChannel", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TelegramChat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Template", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TemplateInstallation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TemplateInstalledResource", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Trigger", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Condition", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TriggerContactHistory", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TriggerExecution", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TriggerStat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "UserDeviceToken", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "UserPersistentMenu", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Webhook", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WebhookExecution", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappBusinessAccount", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappCall", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappCallPermission", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappCoexistStaging", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappFlow", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappMessageTemplate", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappSignupSession", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkingHours", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkingHoursDateOverride", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkingHoursInterval", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkingHoursMember", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Workspace", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkspaceApiToken", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkspaceMac", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkspaceMember", + "entityType": "tables" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "5432", + "generated": null, + "identity": null, + "name": "port", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "database", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credentialRef", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "'disable'", + "generated": null, + "identity": null, + "name": "sslMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isMain", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shardKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "readHost", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "readPort", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shardId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "adsConversionChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'whatsapp'", + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "adsConversionEventSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "adsConversionEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ctwaClid", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contents", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceEventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "adsConversionCapiStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "capiStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiSentAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "adsConversionChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationFacebookAdsId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "adsConversionEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "trigger", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "markAs", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actionPrompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "actionRules", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "messages", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isDefault", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isRichResponse", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "tools", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "webSearchAuthorizedDomains", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "models", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chunkIndex", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "vector(1536)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "embedding", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "aiConversationEmbeddingStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attachmentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "aiConversationSourceType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "aiConversationSourceStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentHash", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "summary", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "vector(1536)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "embedding", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "aiEmbeddingStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiFileId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purpose", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dataCollect", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outputMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "aiHandoverBulkAction", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "aiHandoverBulkStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "message", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestedByUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastHeartbeatAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pausedUntil", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chunkSeq", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cursorContactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inFlightFromId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inFlightToId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "scheduleEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timeRanges", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "gotoFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "returnMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "pauseBotWaitingForStaff", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "applyToAllCustomers", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "applyToAllRevision", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "applyToAllMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "applyToAllRequestedByUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "availableTools", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "selectedTools", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "awaitingSince", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "measuredFrom", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingResponseSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isFirstResponse", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slaTargetSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slaMet", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasResponse", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "analyticsBotResponseType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "analyticsBotRouteType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "routeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "analyticsBotResult", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "result", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiProvider", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "analyticsBroadcastEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "batchId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "analyticsContactEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "analyticsContactSenderType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "analyticsConversationEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromAssignee", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "toAssignee", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "analyticsId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "buttonId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "analyticsMessageEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "analyticsContactSenderType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstSeenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSeenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seenCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstClickedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastClickedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clickCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsManifestStatus", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "objectKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsManifestStatus", + "type": "analyticsStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsManifestStatus", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsManifestStatus", + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ingestedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsManifestStatus", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inviteeTimezone", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "appointmentStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'scheduled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "appointmentLocationTypeSnapshot", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationDetail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventIntegrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventProviderCalendarId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "appointmentExternalSyncStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalSyncStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "30", + "generated": null, + "identity": null, + "name": "durationMinutes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bufferAfterMinutes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "appointmentLocationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationDetail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "appointmentScheduleWindowType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'rollingDays'", + "generated": null, + "identity": null, + "name": "scheduleWindowType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "scheduleWindowConfig", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxAppointmentsPerUser", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "dailyLimitEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxPerDay", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowGroupMeeting", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxPerSlot", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "confirmationMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "confirmationFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancellationFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalConnectionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventTitleTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventDescriptionTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventAttendeesTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicLinkSlug", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "weekday", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startMinute", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endMinute", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timingValue", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "appointmentReminderTimingUnit", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timingUnit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appointmentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reminderConfigId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "appointmentReminderDispatchStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "jobId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sentAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedReason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageCreatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "fileType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "width", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "height", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnailPath", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originPath", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "providerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accessToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accessTokenExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refreshToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refreshTokenExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "password", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "invitedBy", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Jwk", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Jwk", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Jwk", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Jwk", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Jwk", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "privateKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Jwk", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ipAddress", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "emailVerified", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isAnonymous", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "mustChangePassword", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Verification", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Verification", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Verification", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Verification", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "identifier", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Verification", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Verification", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "keywords", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "automatedResponseType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'inbound'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "type": "automationThrottleType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "throttleType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subjectId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastTriggeredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "customFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateData", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'channel'", + "generated": null, + "identity": null, + "name": "targetMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "broadcastStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "broadcastScheduleType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schedulesType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schedulesAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactFilter", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subaction", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handoffCompletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "resumeCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "audienceRangeStart", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "audienceRangeEnd", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendRatePerMinute", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentBroadcastId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurrenceAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rule", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextRunAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountedThroughAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "occurrenceCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastOccurrenceAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pausedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recurrenceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "localSlot", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurrenceAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "broadcastOccurrenceOutcome", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outcome", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "broadcastOccurrenceReason", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "childBroadcastId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "materializedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "supersededCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateData", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceAccountId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalPostId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "caption", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mediaType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permalink", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publishedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadataFetchedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadataAttemptedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "coexistChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "coexistRunType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'coexist'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "coexistRunStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'init'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerSource", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastHeartbeatAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalScan", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentScan", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentPageNumber", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedContactCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedMessageCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastPhase", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastChunkOrder", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "syncProgress", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "coexistMessengerSyncPhase", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'contacts'", + "generated": null, + "identity": null, + "name": "messengerSyncPhase", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pendingPatches", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scanFromAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestedByUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resumeCursor", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "commentAutomationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'messenger'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "repliesCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sentCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "deliveredCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seenCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clickedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "missedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "post", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"text\",\"value\":\"\"}'", + "generated": null, + "identity": null, + "name": "privateReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"none\",\"value\":null}'", + "generated": null, + "identity": null, + "name": "publicReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "includeKeywords", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "excludeKeywords", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "commentExcludeKeywordsType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'contain'", + "generated": null, + "identity": null, + "name": "excludeKeywordsType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"replyToNewContactsOnly\":false,\"replyOncePerUserPerPost\":false,\"likeUserComment\":false,\"replyToUsersWhoCommentedOnOtherPosts\":true,\"ignoreCommentReplies\":true,\"trackUserTags\":false}'", + "generated": null, + "identity": null, + "name": "options", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"all\":false,\"hasPhoneNumber\":false,\"hasImage\":false,\"hasVideo\":false,\"hasLink\":false,\"hasKeywords\":false,\"hasGif\":false,\"hasEmoji\":false,\"keywords\":[],\"showCommentsAfter\":\"none\"}'", + "generated": null, + "identity": null, + "name": "hideComments", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"immediately\",\"value\":0}'", + "generated": null, + "identity": null, + "name": "replyAfter", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentText", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "commentAutomationReplyChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replyChannel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "commentAutomationReplyType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replyType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replyText", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "commentAutomationEventStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorDetail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "httpCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentText", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "commentAutomationMissReason", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purpose", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "targetConnectionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorTokenId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "platformOwnerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originHost", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "returnUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stateNonceHash", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'authorize'", + "generated": null, + "identity": null, + "name": "step", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextAction", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAuth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "targets", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "targetClaims", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "resultConnectionIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "results", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "consumedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "displayName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'connected'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "statusReason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "authExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connectedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disconnectedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "avatar", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumber", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "emailVerified", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "emailOptIn", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "CASE\n WHEN \"firstName\" IS NULL AND \"lastName\" IS NULL THEN NULL\n WHEN \"firstName\" IS NULL THEN \"lastName\"\n WHEN \"lastName\" IS NULL THEN \"firstName\"\n ELSE \"firstName\" || ' ' || \"lastName\"\n END", + "type": "stored" + }, + "identity": null, + "name": "fullName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "gender", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "gender", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastReadAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ref", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "city", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "location", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locale", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subscribedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastSubscribedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "blockedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalTagged", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalNewTagged", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveHourly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveHourly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveHourly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveHourly", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hourBucket", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveHourly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceMacId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactCustomField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactCustomField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactCustomField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactCustomField", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactCustomField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactCustomField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originalContactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "followsBusiness", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessFollowsContact", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountVerified", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "followerCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "contactInboxProfileSnapshotState", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "profileSnapshotState", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "profileSnapshotAttempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "profileSnapshotNextAttemptAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "personaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactLastReadAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstInteractionAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastMessageAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastIncomingMessageAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastOutboundMessageAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referral", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastCommentMessageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastCommentMessageAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "consecutiveFailedReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastInputFailure", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastErrorLog", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastBtnTitle", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUserInput", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "lastUserInputType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUserInputType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webchatParentUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceParentUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceUsername", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceIdentityHistory", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "threadControlState", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlState", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadOwnerRole", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlUpdatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "threadControlEvent", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlLastEvent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadOwnerAppId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadOwnerExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadPreviousOwnerAppId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInboxPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInboxPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInboxPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInboxPost", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactNote", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactNote", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactNote", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactNote", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactNote", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactNote", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdById", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "sent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "case when \"seenAt\" is null then false when \"deliveredAt\" is null then false else \"seenAt\" >= \"deliveredAt\" end", + "type": "stored" + }, + "identity": null, + "name": "isRead", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "enrolledAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextRunAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastStepId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextStepId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockOwner", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appointmentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "ContactOnSmartDelayType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "ContactOnSmartDelayStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactToTag", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactToTag", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagChannelId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "botEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botResumeAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "archivedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "additionalAttributes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactLastReadAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agentLastReadAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiContextLastMessageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastActivityAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "followed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedInboxTeamId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastStep", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminRepliedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactRepliedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "awaitingHumanReplySince", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "awaitingHumanReplyClosedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedUserAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseDueAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseSlaBreachingAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseSlaTargetSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuedContactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "usedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "couponTopicStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasEverHadCoupon", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdById", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "customFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "showInInbox", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "DecisionProviderKind", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "providerKind", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endpoint", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credential", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modelCatalog", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultModel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "DecisionConnectionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'enabled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "DecisionConnectionTestStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastTestStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastTestedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "DecisionProfileStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'enabled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connectionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contract", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thresholdConfig", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "globalRouterEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "globalRouterConfig", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "data", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "backgroundUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sendsTotal", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "deliveredsTotal", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seensTotal", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clicksTotal", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "detail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ipAddress", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "domain", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verifiedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfHostnameId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfOwnershipValue", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfAcmeValue", + "entityType": "columns" + }, + { + "schema": "public", + "table": "License", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "License", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "License", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "License", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "licenseId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "License", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns" + }, + { + "schema": "public", + "table": "License", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'super-admin'", + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disabledReason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brandName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logoLightPath", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logoDarkPath", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "faviconPath", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customCss", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customJs", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "theme", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storageUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "policyUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "termsOfServiceUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "signupEmailTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "forgotPasswordEmailTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "magicLinkEmailTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountCredentialsEmailTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hiddenChannels", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "icon", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactsLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "contactsUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspacesLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "workspacesUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelsLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "channelsUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "teamMembersLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "teamMembersUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "macLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botMessagesLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "monthlyBotMessagesLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "monthlyBotMessagesUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "monthlyBotMessagesPeriodStart", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesTopUpGranted", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "whiteLabel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "ssoSaml", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "saasMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "planName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "planStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "selectedTrialPlanId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelsTornDownAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "syncedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "contactsUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "channelsUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "teamMembersUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "syncedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "detail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "httpCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stackTrace", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'make'", + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "event", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "fieldMapping", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "leadsHandledCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leadgenId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencyOffset", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "budgetType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "budgetMinorUnits", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "campaignId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "facebookUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "facebookUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "fileContextType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contextType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileSize", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "fileStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "meta", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enableInInbox", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentVersionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "draftVersionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "analyticsId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "buttonId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "nodes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "edges", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isDraft", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isLatest", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startNodeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "folderType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isTrash", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "paths", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationGoogleAdsId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "loginCustomerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionCustomerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionCategory", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lookbackWindowDays", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "googleAdsEventSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scopeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "googleAdsClickIdType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickIdType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "googleClickReceivedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transactionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "options", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadMethod", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "googleAdsEventStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sentAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "googleAdsFailureStage", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failureStage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "googleAdsProcessingStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingCheckedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingAttempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextProcessingCheckAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingDetail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "settings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "igStoryAutomationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "igStoryAutomationTrigger", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'storyReply'", + "generated": null, + "identity": null, + "name": "trigger", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "repliesCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "story", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"none\",\"value\":null}'", + "generated": null, + "identity": null, + "name": "reply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "includeKeywords", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "importType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "importFormat", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "format", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "importStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "meta", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "processedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "errorSample", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxResolution", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "identifiers", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fieldMappings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sampleJson", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "requestCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboundWebhookId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idempotencyKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clientIp", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "inboundWebhookRequestStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'received'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "skipReason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fieldErrors", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actionResults", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'connected'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "markReadOnOutbound", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disconnectedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disconnectReason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlSeenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxContactStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxContactStat", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalContacts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxContactStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeam", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeam", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeam", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeam", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeam", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxTeamId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenHash", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenPrefix", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callbackUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Integration", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Integration", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Integration", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Integration", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Integration", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "loginCustomerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "descriptiveName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencyCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionCustomerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "acceptedCustomerDataTerms", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionsSyncedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "setupError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "setupErrorAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'primary'", + "generated": null, + "identity": null, + "name": "providerCalendarId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userInfo", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "igId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "username", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistAiReadsSyncedHistory", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiTestEventCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'instagram'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userInfo", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "personas", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "personaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistAiReadsSyncedHistory", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiTestEventCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "syncTagEnabledAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handoverResumeFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAuth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "metaCatalogAuthMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'oauth'", + "generated": null, + "identity": null, + "name": "authMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "metaCatalogConnectionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "metaCatalogImportStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'idle'", + "generated": null, + "identity": null, + "name": "importStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importTotalCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importFailedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "importError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastImportedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'VND'", + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReplyVoice", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "voice", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiAgentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "baseURL", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultModel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "preset", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'primary'", + "generated": null, + "identity": null, + "name": "providerCalendarId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromAddress", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadsUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "username", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enable", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "authorizedDomains", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brandColor", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hideHeader", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "showLogo", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hideMessageInput", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customCss", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumberId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "displayPhoneNumber", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callingEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "inboundCallsEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callHours", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "callRecordingEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "90", + "generated": null, + "identity": null, + "name": "callRecordingRetentionDays", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "callTranscriptionEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "whatsappCallRecordingMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'metaNative'", + "generated": null, + "identity": null, + "name": "callRecordingMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "whatsappCallTranscriptionMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'metaNative'", + "generated": null, + "identity": null, + "name": "callTranscriptionMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callAnnouncementLanguage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callRecordingPurpose", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistAiReadsSyncedHistory", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isCoexist", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "platformType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "historyDeclined", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiTestEventCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "whatsappRegistrationStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending_verification'", + "generated": null, + "identity": null, + "name": "registrationStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "registrationError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verificationCodeRequestedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handoverResumeFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "oaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fallbackFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "syncTagEnabledAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "coverImageUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startsAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endsAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "leaderboardStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'draft'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "leaderboardPlatform", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "platform", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minigameId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rules", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "followersOnly", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'22:00'", + "generated": null, + "identity": null, + "name": "resetTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "cooldownSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referralWelcomeFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rewardSettings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rewardsTriggeredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rewardRecipients", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leaderboardId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "leaderboardAuditAction", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "delta", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leaderboardId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "score", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isBanned", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referrerContactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "scoredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dailyBucket", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dailyCounts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "breakdown", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastActivityAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leaderboardId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delta", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "leaderboardScoreSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rule", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceRef", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLink", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLink", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLink", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLink", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLink", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLink", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linkId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isFavourite", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastAccessedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentAttributes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "messageType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "contentType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "senderType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "messageKind", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'message'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attributes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sinceTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "MessageCleanupStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "messagingAdChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "messagingAdCreateState", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "createState", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "messagingAdPublishState", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'draft'", + "generated": null, + "identity": null, + "name": "publishState", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaCampaignId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaAdSetId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaAdCreativeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaAdId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "input", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cleanupError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "messagingAdChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'POSITIONAL'", + "generated": null, + "identity": null, + "name": "parameterFormat", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "components", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'current'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentCategory", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'business_messaging'", + "generated": null, + "identity": null, + "name": "actionSource", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "capiStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiSentAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMetaCatalogId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "metaCatalogItemDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'push'", + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retailerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedFingerprint", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMetaCatalogId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "metaCatalogSyncStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'queued'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "metaCatalogItemDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'push'", + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "metaCatalogSyncScope", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'all'", + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "selectedProductIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "handles", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionLeaseId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "succeededCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "itemErrors", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "skippedItems", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "pollAttempt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "definition", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowJson", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "submissionsCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "miniAppId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "whatsappFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "validationErrors", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publishedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "miniAppId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "miniAppSubmissionSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "answers", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "miniAppId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inputName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "miniAppUploadStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "minigameType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "generalSettings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appearance", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "playerSettings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prizeSettings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "winningMessageSettings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nonWinningMessageSettings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "playsCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "participantsCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "winnersCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sharesCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minigameId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "played", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "remaining", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sharesCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referrerContactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minigameId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isWinning", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prizeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prizeName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicConfig", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "livemode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "usePlatformCredential", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isVerified", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verifiedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUsedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortDescription", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "longDescription", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "price", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "taxes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "discount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'USD'", + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sku", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "inventoryPolicy", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'dont_track'", + "generated": null, + "identity": null, + "name": "inventoryPolicy", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "inventoryQuantity", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowOutOfStockPurchase", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "images", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "tags", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subcategoryId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isSearchable", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowSpecialRequest", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isAddonOnly", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "maxSelections", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "addonProductIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "combination", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "price", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "values", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionIdSnapshot", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionTitleSnapshot", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionTypeSnapshot", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "labelSnapshot", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pointsEarned", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "attemptCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "answeredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enableScore", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enableRetryMessages", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enableCustomFieldMapping", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionnaireId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "questionnaireQuestionType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "orderNo", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "point", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retryMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "systemFieldKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "config", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionnaireId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "questionnaireSubmissionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'inProgress'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "totalPoints", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentQuestionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentQuestionSentAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastAnsweredMessageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "RefLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "RefLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linkId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "RefLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "RefLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "RefLinkStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "RefLinkStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "ReflinkType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'refLink'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "qrStyles", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "widgetAuthorizedDomains", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "widgetHiddenInboxIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetLogoFileId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetBrandName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetBrandUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetLogoBackgroundColor", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstResponseTargetSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextResponseTargetSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "25", + "generated": null, + "identity": null, + "name": "breachingThresholdPercent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReply", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReply", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReply", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReply", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortcut", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReply", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReply", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "savedReplyId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mediaLibraryFileId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "subscribers", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "messages", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "runAtMs", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "bucket", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idempotencyKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockOwner", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "enrollmentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "case when \"seenAt\" is null then false when \"deliveredAt\" is null then false else \"seenAt\" >= \"deliveredAt\" end", + "type": "stored" + }, + "identity": null, + "name": "isRead", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "order", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delayDays", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "delayMinutes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delayUnit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "specificDateTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "anytime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendTimeStart", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendTimeEnd", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "'[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\",\"sunday\"]'", + "generated": null, + "identity": null, + "name": "sendDays", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "spreadsheetId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SystemField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SystemField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SystemField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SystemField", + "type": "SystemFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SystemField", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalLabelId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chatId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "telegramChatType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "telegramBotChatStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publisherName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "youtubeVideoId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "testLink", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "selection", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryCounts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formatVersion", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shareToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "shareEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shareExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultPermissions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "createInstallFolder", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "defaultAutoUpdate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "installCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceWorkspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formatVersion", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "templateInstallationStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "warnings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "warningCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "resourceCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installFolderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoUpdate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceUpdatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installedBy", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "templateResourceCategory", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resourceKind", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceResourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "wasExisting", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "actions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webhookId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "operator", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstEnteredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "executedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalContacts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failureCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalExecutions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "devicePlatform", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "platform", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastSeenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "menus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "executedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webhookId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credential", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "grantedScopes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scopeCheckedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provisionedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "creditLineId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wacid", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attemptId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "whatsappCallDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "whatsappCallStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'ringing'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "whatsappCallOutcome", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outcome", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "durationSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "answeredByUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "initiatedByUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordingRequested", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordingFailureReason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordingPath", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transcript", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transcribedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transcriptSegments", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiSummary", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiSummarizedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiSummaryProvider", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "whatsappCallPermissionResponse", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "response", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isPermanent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "respondedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumberId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payloadHash", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parseFailedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "categories", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "validationErrors", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "completedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "screens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "components", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAccessToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "apiVersion", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "candidatePhoneNumberIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "claimedPhoneNumberIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "consumedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHours", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHours", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHours", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHours", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHours", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ranges", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "weekday", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startMinute", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endMinute", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "defaultReplyFrequency", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'allTime'", + "generated": null, + "identity": null, + "name": "defaultReplyFrequency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "targetCountry", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'en'", + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'UTC'", + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'#016DFF'", + "generated": null, + "identity": null, + "name": "brandColor", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "developmentMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "smartResponseDelaySeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logo", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scheduledDeletionAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purgeStartedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "supportAccessUntil", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "capiLimitedDataUse", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "WorkspaceApiTokenPermission", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permission", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenHash", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenPrefix", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isDefault", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "scopes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "workspaceMemberRole", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notificationChannels", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notificationTypes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "onlineSince", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "nameExplicit": true, + "columns": [ + { + "value": "isActive", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageShard_isActive_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessageShard", + "nameExplicit": true, + "columns": [ + { + "value": "shardKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageShard_shardKey_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "nameExplicit": true, + "columns": [ + { + "value": "startTime", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "endTime", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ShardTimeRange_time_lookup_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "nameExplicit": true, + "columns": [ + { + "value": "shardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ShardTimeRange_shardId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspace_integration_source_sourceEventId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"channel\" = 'whatsapp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_ws_whatsapp_source_sourceEventId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"channel\" = 'messenger'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_ws_messenger_source_sourceEventId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationInstagramId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"channel\" = 'instagram'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_ws_instagram_source_sourceEventId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_adId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "enabled", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionRule_workspaceId_channel_enabled_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": true, + "columns": [ + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_sourceId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": true, + "columns": [ + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "chunkIndex", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_sourceId_chunkIndex_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": true, + "columns": [ + { + "value": "embedding", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "vector_cosine_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "hnsw", + "concurrently": false, + "name": "AIConversationEmbedding_embedding_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationSource", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_lookup_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationSource", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_workspaceId_sourceType_sourceKey_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationSource", + "nameExplicit": true, + "columns": [ + { + "value": "messageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_messageId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationSource", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIEmbedding", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIEmbedding_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "status IN ('pending', 'running', 'cancelling')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_inbox_live_uq", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "revision", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_inbox_revision_uq", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_workspace_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "\"createdAt\" DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_inbox_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastHeartbeatAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('pending', 'running', 'cancelling')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_live_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": true, + "columns": [ + { + "value": "requestedByUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_requestedByUserId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": true, + "columns": [ + { + "value": "applyToAllRequestedByUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_applyToAllRequestedByUserId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": true, + "columns": [ + { + "value": "gotoFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_gotoFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsAgentResponseEvent_workspaceId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "aiProvider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_aiProvider_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "hasResponse", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "result", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_hasResponse_result_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBroadcastEvent_workspaceId_broadcastId_eventType_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adminId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_adminId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsConversationEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "toAssignee", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsConversationEvent_workspaceId_toAssignee_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsFlowNodeEvent_workspaceId_flowId_analyticsId_nodeId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "buttonId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsFlowNodeEvent_workspaceId_flowId_analyticsId_nodeId_buttonId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adminId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_adminId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "senderType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_senderType_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsSequenceEvent_workspaceId_sequenceId_stepId_eventType_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_token_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": true, + "columns": [ + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_topicId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_workspaceId_topicId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsManifestStatus", + "nameExplicit": true, + "columns": [ + { + "value": "objectKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsManifestStatus_objectKey_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "startAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_workspaceId_startAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "startAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_calendarId_status_startAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_contactId_calendarId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": true, + "columns": [ + { + "value": "publicLinkSlug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_publicLinkSlug_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendarAvailability_calendarId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "timingValue", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "timingUnit", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendarReminder_dedupe_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "jobId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_jobId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sendAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_status_sendAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "appointmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_appointmentId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Attachment", + "nameExplicit": true, + "columns": [ + { + "value": "messageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "messageCreatedAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_message_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Attachment", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_workspaceId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Attachment", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Account", + "nameExplicit": true, + "columns": [ + { + "value": "providerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "accountId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Account_providerId_accountId_tenantId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Invitation", + "nameExplicit": true, + "columns": [ + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Invitation_code_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Session", + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Session_token_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "User", + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "User_email_tenant_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "User", + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "User_tenantId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomatedResponse_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "nameExplicit": true, + "columns": [ + { + "value": "lastTriggeredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomationThrottle_lastTriggeredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomationThrottle_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BotField", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BotField_workspaceId_type_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" IN ('scheduled', 'sending') AND \"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_workspaceId_active_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_flowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_channel_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "schedulesAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_schedulesAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"deletedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_deletedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "parentBroadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurrenceAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_parentBroadcastId_occurrenceAt_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "nameExplicit": true, + "columns": [ + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrence_broadcastId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrence_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "nameExplicit": true, + "columns": [ + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"nextRunAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrence_due_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": true, + "columns": [ + { + "value": "recurrenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "localSlot", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurrenceAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_recurrenceId_localSlot_occurrenceAt_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": true, + "columns": [ + { + "value": "recurrenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurrenceAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_recurrenceId_occurrenceAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": true, + "columns": [ + { + "value": "childBroadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_childBroadcastId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastTarget_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastTarget_flowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ChannelPost", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "externalPostId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ChannelPost_workspaceId_channel_externalPostId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ChannelPost", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "COALESCE(\"publishedAt\", \"createdAt\") DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ChannelPost_workspaceId_sortAt_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ChannelPost", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ChannelPost_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_workspace_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastHeartbeatAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('init', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_active_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "\"startedAt\" DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('succeeded', 'partial')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_resume_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "status = 'init' AND type = 'coexist'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_init_uq", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "type = 'contact_scan' AND status IN ('init', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_contact_scan_active_uq", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "type = 'contact_scan'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_contact_scan_due_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomation_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomation_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomation_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "commentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "replyChannel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_dedup_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_automation_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"replyChannel\" = 'private' AND \"deliveredAt\" IS NOT NULL AND \"seenAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_private_unseen_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'failed'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_failed_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "commentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_dedup_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_automation_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "postId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationReply_dedup_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationReply_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": true, + "columns": [ + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_expiresAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": true, + "columns": [ + { + "value": "consumedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"consumedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_consumedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": true, + "columns": [ + { + "value": "stateNonceHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_stateNonceHash_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "provider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_workspaceId_provider_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": true, + "columns": [ + { + "value": "provider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_provider_sourceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "broadcastSubscribedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_broadcast_subscribed_at", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_created_at", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_email", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "phoneNumber", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_phone_number", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "md5(btrim(regexp_replace(\"fullName\", '[ \\t\\n\\v\\f\\r]+', ' ', 'g')))", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_full_name_md5", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "firstName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_firstName_trgm_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "lastName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_lastName_trgm_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_email_trgm_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumber", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_phoneNumber_trgm_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactCustomField", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactCustomField_contactId_customFieldId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactCustomField", + "nameExplicit": true, + "columns": [ + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactCustomField_customFieldId_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceUserId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceUserId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceParentUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceParentUserId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceParentUserId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "profileSnapshotNextAttemptAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"profileSnapshotState\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_profileSnapshot_pending_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"threadControlState\" = 'standby' AND \"threadOwnerRole\" = 'ai_agent'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_id_ai_held_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastIncomingMessageAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_contactId_lastIncomingMessageAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastOutboundMessageAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_contactId_lastOutboundMessageAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "(\"referral\"->>'ctwaClid')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referral\"->>'ctwaClid' IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_referral_ctwaClid_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "(\"referral\"->>'adId')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referral\"->>'adId' IS NOT NULL AND \"referral\"->>'source' = 'ADS'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_referral_adId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInboxPost", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "postId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInboxPost_workspaceId_postId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactNote", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactNote_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_on_broadcast_contact_id", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnBroadcast_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": true, + "columns": [ + { + "value": "isRead", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_on_broadcast_is_read", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": true, + "columns": [ + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"sent\" = false AND \"failedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnBroadcast_unsent_order_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_sequenceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_status_nextRunAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_workspaceId_status_nextRunAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_contactId_sequenceId_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_workspaceId_flowId_contactInboxId_stepId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "triggerAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_status_triggerAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": true, + "columns": [ + { + "value": "appointmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_appointmentId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" NOT IN ('completed', 'failed', 'canceled') AND \"type\" = 'followUp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_followUp_active_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" NOT IN ('completed', 'failed', 'canceled') AND \"type\" = 'quickReplyFollowUp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_quickReplyFollowUp_active_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTagChannel_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTagChannel_tagId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_dm_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "responseDueAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"responseDueAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_workspaceId_responseDueAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": true, + "columns": [ + { + "value": "aiContextLastMessageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_aiContextLastMessageId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastActivityAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_workspaceId_lastActivityAt_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_conversationId_userId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_code_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"issuedContactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_issuedContactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "issuedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_issuedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "usedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_usedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_code_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "usedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_usedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CouponTopic", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_status_deletedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CouponTopic", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_expiresAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CouponTopic", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_name_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CustomField", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomField_workspaceId_type_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DecisionConnection", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionConnection_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DecisionConnection", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionConnection_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DecisionProfile", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DecisionProfile", + "nameExplicit": true, + "columns": [ + { + "value": "connectionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_connectionId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DecisionProfile", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DecisionProfile", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"globalRouterEnabled\" = true", + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_workspaceId_globalRouter_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DynamicImage", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DynamicImage_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "EmailTopic", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EmailTopic_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "EmailTopic", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EmailTopic_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AuditLog", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AuditLog_workspaceId_createdAt_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AuditLog", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"userId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AuditLog_workspaceId_userId_createdAt_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CustomDomain", + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_tenantId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CustomDomain", + "nameExplicit": true, + "columns": [ + { + "value": "domain", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_domain_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CustomDomain", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "License", + "nameExplicit": true, + "columns": [ + { + "value": "licenseId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "License_licenseId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformAdmin_userId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Tenant", + "nameExplicit": true, + "columns": [ + { + "value": "ownerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tenant_ownerId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "position", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TenantHelpItem_tenantId_position_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "UserQuota", + "nameExplicit": true, + "columns": [ + { + "value": "channelsTornDownAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserQuota_channelsTornDownAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "UserQuota", + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"channelsTornDownAt\" IS NULL AND \"planStatus\" = 'trial'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserQuota_due_expired_trial_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ErrorLog", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ErrorLog_workspaceId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ErrorLog", + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ErrorLog_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ErrorLog", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ErrorLog_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "event", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ExternalWebhook_workspaceId_event_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "event", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "url", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ExternalWebhook_workspaceId_event_url_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "pageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "formId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsAutomation_workspaceId_pageId_formId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "leadgenId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_automationId_leadgenId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "nameExplicit": true, + "columns": [ + { + "value": "leadgenId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_leadgenId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookMarketingMessage_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "nameExplicit": true, + "columns": [ + { + "value": "campaignId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookMarketingMessage_campaignId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookMarketingMessagesAuth_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "File", + "nameExplicit": true, + "columns": [ + { + "value": "path", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_path_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "File", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contextType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_workspaceId_contextType_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "File", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "subType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_workspaceId_subType_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowAnalyticsSession_workspaceId_flowId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowAnalyticsSession_flowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "buttonId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowNodeStat_filter_1_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"eventType\" = 'seen' AND \"seenAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowNodeStat_filter_2_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FlowRun", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowRun_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Folder", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Folder_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Folder", + "nameExplicit": true, + "columns": [ + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Folder_parentId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "transactionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_workspaceId_transactionId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_workspaceId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_workspaceId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextProcessingCheckAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_status_nextProcessingCheckAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "claimedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_status_claimedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsSettings_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_workspaceId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_workspaceId_type_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_inboxId_type_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": true, + "columns": [ + { + "value": "fileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_fileId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"type\" = 'products' AND \"status\" IN ('pending', 'processing')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_products_active_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhook", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhook_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhook", + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhook_token_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "inboundWebhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "idempotencyKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"idempotencyKey\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_inboundWebhookId_idempotencyKey_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "inboundWebhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_inboundWebhookId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'received'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_createdAt_received_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "claimedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'processing'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_claimedAt_processing_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Inbox", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Inbox_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Inbox", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Inbox_workspaceId_channel_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationActiveCampaign_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationActiveCampaign_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationApi", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationApi_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationApi", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationApi_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationApi", + "nameExplicit": true, + "columns": [ + { + "value": "tokenHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationApi_tokenHash_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Integration", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Integration_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Integration", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Integration_workspaceId_integrationType_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationClaude_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationClaude_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDeepseek_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDeepseek_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDrip_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDrip_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationFacebookAds_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationFacebookAds_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGemini_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGemini_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGetResponse_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGetResponse_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleAds_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleAds_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleCalendar_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleSheet_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_welcomeFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + { + "value": "igId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_igId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationKlaviyo_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationKlaviyo_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailchimp_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailchimp_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailerLite_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailerLite_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_welcomeFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": true, + "columns": [ + { + "value": "handoverResumeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_handoverResumeFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": true, + "columns": [ + { + "value": "pageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_pageId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "nameExplicit": true, + "columns": [ + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_deletedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMoosend_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMoosend_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenAI_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenAI_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "preset", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"preset\" <> 'custom'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_workspaceId_preset_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenrouter_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenrouter_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOutlookCalendar_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSendGrid_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSendGrid_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSmtp_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSmtp_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "nameExplicit": true, + "columns": [ + { + "value": "botId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_botId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationThreads_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationThreads_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "nameExplicit": true, + "columns": [ + { + "value": "threadsUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationThreads_threadsUserId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "nameExplicit": true, + "columns": [ + { + "value": "openId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_openId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_welcomeFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": true, + "columns": [ + { + "value": "handoverResumeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_handoverResumeFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_phoneNumberId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": true, + "columns": [ + { + "value": "fallbackFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_fallbackFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": true, + "columns": [ + { + "value": "oaId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_oaId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Leaderboard_workspaceId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Leaderboard_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Leaderboard_minigameId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardAuditLog_leaderboardId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "score", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "scoredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "NOT \"isBanned\"", + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_ranking_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "referrerContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_leaderboardId_referrerContactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardScoreEvent_leaderboardId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardScoreEvent_leaderboardId_contactId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardScoreEvent_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MagicLink", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLink_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MagicLink", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLink_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "linkId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLinkStat_workspaceId_linkId_occurredAt_contactInboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MediaLibraryFile_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MediaLibraryFile_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MediaLibraryFolder_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Message", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_conversation_history_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Message", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_workspace_created_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Message", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_contactInboxId_sourceId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Message", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_conversationId_type_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Message", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"parentId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_parentId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessageCleanup", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_inboxId_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessageCleanup", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_status_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessageCleanup", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_integrationWhatsappId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_integrationMessengerId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": true, + "columns": [ + { + "value": "integrationInstagramId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_integrationInstagramId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_integrationWhatsappId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_integrationMessengerId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": true, + "columns": [ + { + "value": "integrationInstagramId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_integrationInstagramId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerMessageTemplate_integrationMessengerId_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerWelcomeMessageFlow_workspaceId_flowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerWelcomeMessageFlow_integrationMessengerId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" = 'current'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerWelcomeMessageFlow_current_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_workspaceId_channel_sourceKey_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "nameExplicit": true, + "columns": [ + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_channel_integrationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "nameExplicit": true, + "columns": [ + { + "value": "integrationMetaCatalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "catalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "retailerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_integration_retailer_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "nameExplicit": true, + "columns": [ + { + "value": "integrationMetaCatalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "catalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_integration_product_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_productId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" IN ('queued', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogSyncRun_active_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniApp", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniApp_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniApp", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniApp_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "nameExplicit": true, + "columns": [ + { + "value": "miniAppId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppPublication_miniAppId_integrationWhatsappId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "nameExplicit": true, + "columns": [ + { + "value": "miniAppId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppSubmission_miniAppId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppSubmission_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": true, + "columns": [ + { + "value": "uploadToken", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_uploadToken_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": true, + "columns": [ + { + "value": "path", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_path_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": true, + "columns": [ + { + "value": "miniAppId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "inputName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_miniAppId_inputName_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": true, + "columns": [ + { + "value": "submissionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_submissionId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Minigame", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Minigame_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Minigame", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Minigame_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_minigameId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_minigameId_contactId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MinigamePlay", + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigamePlay_minigameId_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MinigamePlay", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigamePlay_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "PlatformCredential", + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "livemode", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"userId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_user_type_livemode_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "PlatformCredential", + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "livemode", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"userId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_platform_type_livemode_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "PlatformCredential", + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_userId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Product", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Product", + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_categoryId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Product", + "nameExplicit": true, + "columns": [ + { + "value": "subcategoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_subcategoryId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ProductAddon", + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductAddon_productId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ProductCategory", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductCategory_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ProductCategory", + "nameExplicit": true, + "columns": [ + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductCategory_parentId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ProductVariant", + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductVariant_productId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductVariantOption_productId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "nameExplicit": true, + "columns": [ + { + "value": "submissionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "questionIdSnapshot", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireAnswer_submissionId_questionIdSnapshot_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "nameExplicit": true, + "columns": [ + { + "value": "questionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireAnswer_questionId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Questionnaire", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Questionnaire_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Questionnaire", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Questionnaire_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "orderNo", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireQuestion_questionnaireId_orderNo_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "nameExplicit": true, + "columns": [ + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireQuestion_customFieldId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_questionnaireId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_questionnaireId_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" = 'inProgress'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_workspaceId_contactId_active_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "RefLinkStat", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "RefLinkStat_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "RefLinkStat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "linkId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "RefLinkStat_workspaceId_linkId_occurredAt_contactInboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Reflink", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Reflink_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "nameExplicit": true, + "columns": [ + { + "value": "savedReplyId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_savedReplyId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "nameExplicit": true, + "columns": [ + { + "value": "mediaLibraryFileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_mediaLibraryFileId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "nameExplicit": true, + "columns": [ + { + "value": "savedReplyId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "mediaLibraryFileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_savedReplyId_mediaLibraryFileId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Sequence", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Sequence_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Sequence", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Sequence_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "idempotencyKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_idempotencyKey_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_pending_runAtMs_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "bucket", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_pending_bucket_runAtMs_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_status_runAtMs_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_workspaceId_status_runAtMs_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "enrollmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_enrollmentId_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_workspace_sequence_step_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "bucket", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_bucket_status_runAtMs_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "updatedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" in ('completed', 'failed', 'canceled')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_terminal_updatedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceStep", + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceStep_sequenceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceStep", + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceStep_flowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Spreadsheet", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Spreadsheet", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "spreadsheetId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_workspaceId_spreadsheetId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Spreadsheet", + "nameExplicit": true, + "columns": [ + { + "value": "spreadsheetId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_spreadsheetId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Tag", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tag_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Tag", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tag_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TagChannel", + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_tag_integration_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TagChannel", + "nameExplicit": true, + "columns": [ + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "externalLabelId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_external_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TagChannel", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_workspace_channel_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TagChannel", + "nameExplicit": true, + "columns": [ + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_integration_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TelegramChat", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "chatId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TelegramChat_inboxId_chatId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TelegramChat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TelegramChat_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Template", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Template", + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_tenantId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Template", + "nameExplicit": true, + "columns": [ + { + "value": "shareToken", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_shareToken_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": true, + "columns": [ + { + "value": "templateId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_templateId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_workspaceId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "nameExplicit": true, + "columns": [ + { + "value": "installationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstalledResource_installationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "resourceKind", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "resourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstalledResource_workspaceId_resourceKind_resourceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Trigger", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Trigger", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Trigger", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Trigger", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "active", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_active_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_source_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_triggerId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": true, + "columns": [ + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_webhookId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_sourceId_triggerId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_sourceId_webhookId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_triggerId_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerExecution", + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_triggerId_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerExecution", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerExecution", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerStat", + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_triggerId_date_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerStat", + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_triggerId_date_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerStat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_workspaceId_date_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserDeviceToken_userId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserPersistentMenu_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Webhook", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Webhook", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Webhook", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "active", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_workspaceId_active_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WebhookExecution", + "nameExplicit": true, + "columns": [ + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_webhookId_contactId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WebhookExecution", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WebhookExecution", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "wabaId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappBusinessAccount_workspaceId_wabaId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "wacid", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"wacid\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_wacid_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "attemptId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"attemptId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_attemptId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_workspaceId_createdAt_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_contactInboxId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'ringing'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_ringing_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'ringing' AND \"wacid\" IS NOT NULL AND \"answeredByUserId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_resumableRinging_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "recordedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"recordingPath\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_recording_inboxId_recordedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"direction\" = 'businessInitiated' AND \"status\" IN ('ringing', 'accepted')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_pendingOutbound_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCallPermission_contactInboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCallPermission_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_phoneNumberId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "payloadHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_phone_hash_uq", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "nameExplicit": true, + "columns": [ + { + "value": "processedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"processedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_processedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "nameExplicit": true, + "columns": [ + { + "value": "parseFailedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"parseFailedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_parseFailedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappFlow_integrationWhatsappId_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappMessageTemplate_integrationWhatsappId_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappSignupSession_userId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "nameExplicit": true, + "columns": [ + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappSignupSession_expiresAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkingHours", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHours_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"workingHoursId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursDateOverride_workspace_date_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "nameExplicit": true, + "columns": [ + { + "value": "workingHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"workingHoursId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursDateOverride_schedule_date_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursDateOverride_workspaceId_date_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "nameExplicit": true, + "columns": [ + { + "value": "workingHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursInterval_workingHoursId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "nameExplicit": true, + "columns": [ + { + "value": "workingHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursMember_workingHoursId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Workspace", + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_tenantId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Workspace", + "nameExplicit": true, + "columns": [ + { + "value": "scheduledDeletionAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_scheduledDeletionAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Workspace", + "nameExplicit": true, + "columns": [ + { + "value": "supportAccessUntil", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_supportAccessUntil_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceApiToken_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"isDefault\"", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceApiToken_workspaceId_default_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceMember_workspaceId_userId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "nameExplicit": false, + "columns": [ + "shardId" + ], + "schemaTo": "public", + "tableTo": "MessageShard", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ShardTimeRange_shardId_MessageShard_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_IENNsXLBb1k1_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_yeTDEtvJMs4H_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_1X1qUqZpm24x_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AdsConversionEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_k99JXbMObQIn_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "nameExplicit": false, + "columns": [ + "integrationFacebookAdsId" + ], + "schemaTo": "public", + "tableTo": "IntegrationFacebookAds", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_fBmu8W26Mw5R_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_3zzAptVRRuZD_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_HUibBtSUZbML_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIAgent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIAgent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": false, + "columns": [ + "sourceId" + ], + "schemaTo": "public", + "tableTo": "AIConversationSource", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_sourceId_AIConversationSource_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIConversationSource", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationSource_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIConversationSource", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationSource_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIEmbedding", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIEmbedding_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIEmbedding", + "nameExplicit": false, + "columns": [ + "aiFileId" + ], + "schemaTo": "public", + "tableTo": "AIFile", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIEmbedding_aiFileId_AIFile_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIFile", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIFile_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIFunction", + "nameExplicit": false, + "columns": [ + "triggerFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIFunction_triggerFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIFunction", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIFunction_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverBulkRun_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverBulkRun_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": false, + "columns": [ + "requestedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIHandoverBulkRun_requestedByUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverSettings_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverSettings_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": false, + "columns": [ + "gotoFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIHandoverSettings_gotoFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": false, + "columns": [ + "applyToAllRequestedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIHandoverSettings_applyToAllRequestedByUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIMCPServer", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIMCPServer_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsAgentResponseEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsBotMessageEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsBroadcastEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsContactEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsConversationEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsFlowNodeEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsMessageEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsSequenceEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AnalyticsEmailTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Appointment_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": false, + "columns": [ + "calendarId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Appointment_calendarId_AppointmentCalendar_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Appointment_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Appointment_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Appointment_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": false, + "columns": [ + "confirmationFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_confirmationFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": false, + "columns": [ + "cancellationFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_cancellationFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": false, + "columns": [ + "externalConnectionId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_externalConnectionId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "nameExplicit": false, + "columns": [ + "calendarId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarAvailability_QfahoIQAX592_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "nameExplicit": false, + "columns": [ + "calendarId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarReminder_5O4INfYC3dY3_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarReminder_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": false, + "columns": [ + "appointmentId" + ], + "schemaTo": "public", + "tableTo": "Appointment", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_appointmentId_Appointment_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": false, + "columns": [ + "reminderConfigId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendarReminder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_a526jJM55OD7_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentReminderDispatch_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Account", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Account_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Account", + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Account_tenantId_Tenant_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Invitation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Invitation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Invitation", + "nameExplicit": false, + "columns": [ + "invitedBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Invitation_invitedBy_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Session", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Session_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "User", + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "User_tenantId_Tenant_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomatedResponse_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AutomatedResponse_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AutomatedResponse_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomationThrottle_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomationThrottle_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BotField", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BotField_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BotField", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BotField_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Broadcast_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Broadcast_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_integrationWhatsappId_IntegrationWhatsapp_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_integrationMessengerId_IntegrationMessenger_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": false, + "columns": [ + "parentBroadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_parentBroadcastId_Broadcast_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrence_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "nameExplicit": false, + "columns": [ + "broadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrence_broadcastId_Broadcast_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrenceOccurrence_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": false, + "columns": [ + "recurrenceId" + ], + "schemaTo": "public", + "tableTo": "BroadcastRecurrence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrenceOccurrence_x0yNXfzZ2cZs_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": false, + "columns": [ + "childBroadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BroadcastRecurrenceOccurrence_Md67cxyTrOQZ_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "nameExplicit": false, + "columns": [ + "broadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastTarget_broadcastId_Broadcast_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastTarget_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BroadcastTarget_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ChannelPost", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ChannelPost_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ChannelPost", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ChannelPost_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": false, + "columns": [ + "requestedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CoexistSyncRun_requestedByUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomation", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomation_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomation", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomation_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "CommentAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationEvent_automationId_CommentAutomation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationEvent_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationMiss_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "CommentAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationMiss_automationId_CommentAutomation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationMiss_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationMiss_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "CommentAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "CommentAutomationReply_automationId_CommentAutomation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "CommentAutomationReply_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "CommentAutomationReply_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConnectSession_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": false, + "columns": [ + "targetConnectionId" + ], + "schemaTo": "public", + "tableTo": "Connection", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConnectSession_targetConnectionId_Connection_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": false, + "columns": [ + "actorUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ConnectSession_actorUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": false, + "columns": [ + "actorTokenId" + ], + "schemaTo": "public", + "tableTo": "WorkspaceApiToken", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ConnectSession_actorTokenId_WorkspaceApiToken_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Connection_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Connection_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Connection_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": false, + "columns": [ + "createdBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Connection_createdBy_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Contact_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactCustomField", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactCustomField_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactCustomField", + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactCustomField_customFieldId_CustomField_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactInbox_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactInbox_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactNote", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactNote_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactNote", + "nameExplicit": false, + "columns": [ + "createdById" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactNote_createdById_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": false, + "columns": [ + "broadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_broadcastId_Broadcast_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": false, + "columns": [ + "sequenceId" + ], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_sequenceId_Sequence_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSmartDelay_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": false, + "columns": [ + "appointmentId" + ], + "schemaTo": "public", + "tableTo": "Appointment", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ContactOnSmartDelay_appointmentId_Appointment_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSmartDelay_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactToTag", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTag_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactToTag", + "nameExplicit": false, + "columns": [ + "tagId" + ], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTag_tagId_Tag_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "nameExplicit": false, + "columns": [ + "tagId" + ], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_tagId_Tag_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "nameExplicit": false, + "columns": [ + "tagChannelId" + ], + "schemaTo": "public", + "tableTo": "TagChannel", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_tagChannelId_TagChannel_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": false, + "columns": [ + "assignedUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Conversation_assignedUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": false, + "columns": [ + "assignedInboxTeamId" + ], + "schemaTo": "public", + "tableTo": "InboxTeam", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Conversation_assignedInboxTeamId_InboxTeam_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Conversation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Conversation_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Coupon_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": false, + "columns": [ + "topicId" + ], + "schemaTo": "public", + "tableTo": "CouponTopic", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Coupon_topicId_CouponTopic_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": false, + "columns": [ + "issuedContactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Coupon_issuedContactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CouponTopic", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CouponTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CouponTopic", + "nameExplicit": false, + "columns": [ + "createdById" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CouponTopic_createdById_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CustomField", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CustomField_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CustomField", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CustomField_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "DecisionConnection", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DecisionConnection_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "DecisionProfile", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DecisionProfile_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "DecisionProfile", + "nameExplicit": false, + "columns": [ + "connectionId" + ], + "schemaTo": "public", + "tableTo": "DecisionConnection", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "DecisionProfile_connectionId_DecisionConnection_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "DynamicImage", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DynamicImage_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "DynamicImage", + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "DynamicImage_customFieldId_CustomField_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "EmailTopic", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EmailTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "EmailTopic", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EmailTopic_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AuditLog", + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AuditLog_workspaceId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AuditLog", + "nameExplicit": true, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AuditLog_userId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CustomDomain", + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CustomDomain_tenantId_Tenant_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "PlatformAdmin_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Tenant", + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Tenant_ownerId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TenantHelpItem_tenantId_Tenant_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "UserQuota", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "UserQuota_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "WorkspaceUsage_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ErrorLog", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ErrorLog_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ErrorLog", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ErrorLog_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ExternalWebhook_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookLeadAdsAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "FacebookLeadAdsAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookLeadAdsLead_n8swD949nr3L_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "FacebookLeadAdsLead_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookMarketingMessage_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookMarketingMessagesAuth_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "File", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "File_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "File", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "File_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Flow", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Flow_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Flow", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Flow_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowNodeStat_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowRun", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowRun", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowRun", + "nameExplicit": false, + "columns": [ + "flowVersionId" + ], + "schemaTo": "public", + "tableTo": "FlowVersion", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_flowVersionId_FlowVersion_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowRun", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowVersion", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowVersion_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowVersion", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowVersion_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Folder", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Folder_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "GoogleAdsConversionEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": false, + "columns": [ + "integrationGoogleAdsId" + ], + "schemaTo": "public", + "tableTo": "IntegrationGoogleAds", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "GoogleAdsConversionEvent_Ju5oh0fVmaLy_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "GoogleAdsConversionEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "GoogleAdsSettings_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IgStoryAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IgStoryAutomation_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IgStoryAutomation_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Import_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Import_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Import_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": false, + "columns": [ + "fileId" + ], + "schemaTo": "public", + "tableTo": "File", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Import_fileId_File_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboundWebhook", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboundWebhook_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboundWebhookRequest_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": false, + "columns": [ + "inboundWebhookId" + ], + "schemaTo": "public", + "tableTo": "InboundWebhook", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboundWebhookRequest_inboundWebhookId_InboundWebhook_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "InboundWebhookRequest_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "InboundWebhookRequest_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Inbox", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Inbox_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboxContactStat", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxContactStat_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboxTeam", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeam_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "nameExplicit": false, + "columns": [ + "inboxTeamId" + ], + "schemaTo": "public", + "tableTo": "InboxTeam", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeamMember_inboxTeamId_InboxTeam_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeamMember_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationActiveCampaign_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationActiveCampaign_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationApi", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationApi_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationApi", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationApi_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Integration", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Integration_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationClaude_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationClaude_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDeepseek_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDeepseek_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDrip_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDrip_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationFacebookAds_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationFacebookAds_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGemini_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGemini_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGetResponse_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGetResponse_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleAds_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleAds_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleCalendar_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleSheet_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleSheet_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationInstagram_workspaceId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationInstagram_inboxId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + "welcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationInstagram_welcomeFlowId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationKlaviyo_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationKlaviyo_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailchimp_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailchimp_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailerLite_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailerLite_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMessenger_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMessenger_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": false, + "columns": [ + "welcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationMessenger_welcomeFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": false, + "columns": [ + "handoverResumeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationMessenger_handoverResumeFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMetaCatalog_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMetaCatalog_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMoosend_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMoosend_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenai_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenai_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "nameExplicit": false, + "columns": [ + "aiAgentId" + ], + "schemaTo": "public", + "tableTo": "AIAgent", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationOpenai_aiAgentId_AIAgent_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenaiCompatible_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenaiCompatible_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenrouter_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenrouter_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOutlookCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOutlookCalendar_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSendGrid_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSendGrid_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSmtp_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSmtp_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTelegram_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTelegram_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationThreads_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationThreads_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTiktok_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTiktok_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWebchat_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWebchat_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": false, + "columns": [ + "welcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationWebchat_welcomeFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": false, + "columns": [ + "handoverResumeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationWhatsapp_handoverResumeFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWhatsapp_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWhatsapp_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationZalo_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationZalo_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": false, + "columns": [ + "fallbackFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationZalo_fallbackFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Leaderboard_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Leaderboard_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": false, + "columns": [ + "minigameId" + ], + "schemaTo": "public", + "tableTo": "Minigame", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Leaderboard_minigameId_Minigame_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": false, + "columns": [ + "referralWelcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Leaderboard_referralWelcomeFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "nameExplicit": false, + "columns": [ + "leaderboardId" + ], + "schemaTo": "public", + "tableTo": "Leaderboard", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardAuditLog_leaderboardId_Leaderboard_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardAuditLog_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "LeaderboardAuditLog_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "nameExplicit": false, + "columns": [ + "actorUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "LeaderboardAuditLog_actorUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": false, + "columns": [ + "leaderboardId" + ], + "schemaTo": "public", + "tableTo": "Leaderboard", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardParticipant_leaderboardId_Leaderboard_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardParticipant_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardParticipant_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": false, + "columns": [ + "referrerContactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "LeaderboardParticipant_referrerContactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MagicLink", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLink_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLinkStat_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "nameExplicit": false, + "columns": [ + "linkId" + ], + "schemaTo": "public", + "tableTo": "MagicLink", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLinkStat_linkId_MagicLink_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MediaLibraryFile_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "MediaLibraryFolder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MediaLibraryFile_folderId_MediaLibraryFolder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MediaLibraryFolder_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_D2X0VlACjh0B_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_DlCmuyYqclNt_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_LwL2ykeZegup_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": false, + "columns": [ + "createdBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MessagingAdOperation_createdBy_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_Q2FrBLiP3QqD_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_tLZC78O5pMBb_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_4ubezEjd9jQX_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerMessageTemplate_x0Vv1d8cvLYN_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerWelcomeMessageFlow_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerWelcomeMessageFlow_OSpsF41G77zr_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCapiEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCapiEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "nameExplicit": false, + "columns": [ + "integrationMetaCatalogId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMetaCatalog", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogItem_wJXyKUssR08y_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogItem_productId_Product_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogSyncRun_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "nameExplicit": false, + "columns": [ + "integrationMetaCatalogId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMetaCatalog", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogSyncRun_8PnmCJ0uISUd_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MetaCatalogSyncRun_categoryId_ProductCategory_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniApp", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniApp_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "nameExplicit": false, + "columns": [ + "miniAppId" + ], + "schemaTo": "public", + "tableTo": "MiniApp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppPublication_miniAppId_MiniApp_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppPublication_oBb1VPqI8uvn_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "nameExplicit": false, + "columns": [ + "whatsappFlowId" + ], + "schemaTo": "public", + "tableTo": "WhatsappFlow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MiniAppPublication_whatsappFlowId_WhatsappFlow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppSubmission_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "nameExplicit": false, + "columns": [ + "miniAppId" + ], + "schemaTo": "public", + "tableTo": "MiniApp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppSubmission_miniAppId_MiniApp_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MiniAppSubmission_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppUpload_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": false, + "columns": [ + "miniAppId" + ], + "schemaTo": "public", + "tableTo": "MiniApp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppUpload_miniAppId_MiniApp_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppUpload_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": false, + "columns": [ + "submissionId" + ], + "schemaTo": "public", + "tableTo": "MiniAppSubmission", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MiniAppUpload_submissionId_MiniAppSubmission_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Minigame", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Minigame_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": false, + "columns": [ + "minigameId" + ], + "schemaTo": "public", + "tableTo": "Minigame", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigameContact_minigameId_Minigame_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigameContact_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": false, + "columns": [ + "referrerContactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MinigameContact_referrerContactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MinigameContact_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MinigamePlay", + "nameExplicit": false, + "columns": [ + "minigameId" + ], + "schemaTo": "public", + "tableTo": "Minigame", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigamePlay_minigameId_Minigame_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MinigamePlay", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigamePlay_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "PlatformCredential", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Credential_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Product", + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_categoryId_ProductCategory_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Product", + "nameExplicit": false, + "columns": [ + "subcategoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_subcategoryId_ProductCategory_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Product", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Product_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ProductAddon", + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductAddon_productId_Product_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ProductCategory", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductCategory_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ProductCategory", + "nameExplicit": false, + "columns": [ + "parentId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductCategory_parentId_ProductCategory_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ProductVariant", + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductVariant_productId_Product_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductVariantOption_productId_Product_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "nameExplicit": false, + "columns": [ + "submissionId" + ], + "schemaTo": "public", + "tableTo": "QuestionnaireSubmission", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireAnswer_l8clOEM7NsPl_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "nameExplicit": false, + "columns": [ + "questionId" + ], + "schemaTo": "public", + "tableTo": "QuestionnaireQuestion", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireAnswer_questionId_QuestionnaireQuestion_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Questionnaire", + "nameExplicit": false, + "columns": [ + "triggerFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Questionnaire_triggerFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Questionnaire", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Questionnaire_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "nameExplicit": false, + "columns": [ + "questionnaireId" + ], + "schemaTo": "public", + "tableTo": "Questionnaire", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireQuestion_questionnaireId_Questionnaire_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireQuestion_customFieldId_CustomField_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": false, + "columns": [ + "questionnaireId" + ], + "schemaTo": "public", + "tableTo": "Questionnaire", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_questionnaireId_Questionnaire_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireSubmission_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": false, + "columns": [ + "currentQuestionId" + ], + "schemaTo": "public", + "tableTo": "QuestionnaireQuestion", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireSubmission_mha0bYFxcV7A_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "RefLinkStat", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "RefLinkStat_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "RefLinkStat", + "nameExplicit": false, + "columns": [ + "linkId" + ], + "schemaTo": "public", + "tableTo": "Reflink", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "RefLinkStat_linkId_Reflink_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Reflink", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Reflink_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Reflink", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Reflink_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Reflink", + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Reflink_customFieldId_CustomField_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Reflink", + "nameExplicit": false, + "columns": [ + "widgetLogoFileId" + ], + "schemaTo": "public", + "tableTo": "MediaLibraryFile", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Reflink_widgetLogoFileId_MediaLibraryFile_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ResponseSlaPolicy_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SavedReply", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReply_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "nameExplicit": false, + "columns": [ + "savedReplyId" + ], + "schemaTo": "public", + "tableTo": "SavedReply", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReplyImage_savedReplyId_SavedReply_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "nameExplicit": false, + "columns": [ + "mediaLibraryFileId" + ], + "schemaTo": "public", + "tableTo": "MediaLibraryFile", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReplyImage_mediaLibraryFileId_MediaLibraryFile_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReplyImage_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Sequence", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Sequence_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Sequence", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Sequence_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": false, + "columns": [ + "sequenceId" + ], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_sequenceId_Sequence_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": false, + "columns": [ + "stepId" + ], + "schemaTo": "public", + "tableTo": "SequenceStep", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_stepId_SequenceStep_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + "enrollmentId", + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "ContactOnSequence", + "columnsTo": [ + "id", + "workspaceId" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_enrollment_workspace_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceStep", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "SequenceStep_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceStep", + "nameExplicit": false, + "columns": [ + "sequenceId" + ], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceStep_sequenceId_Sequence_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Spreadsheet", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Spreadsheet_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Tag", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Tag_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Tag", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Tag_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TagChannel", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TagChannel_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TagChannel", + "nameExplicit": false, + "columns": [ + "tagId" + ], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TagChannel_tagId_Tag_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TelegramChat", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TelegramChat_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TelegramChat", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TelegramChat_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Template", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Template_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Template", + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Template_tenantId_Tenant_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Template", + "nameExplicit": false, + "columns": [ + "createdBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Template_createdBy_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstallation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": false, + "columns": [ + "templateId" + ], + "schemaTo": "public", + "tableTo": "Template", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_templateId_Template_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": false, + "columns": [ + "installFolderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_installFolderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": false, + "columns": [ + "installedBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_installedBy_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "nameExplicit": false, + "columns": [ + "installationId" + ], + "schemaTo": "public", + "tableTo": "TemplateInstallation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstalledResource_a0BqwWeO96EB_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstalledResource_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Trigger", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Trigger_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Trigger", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Trigger_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Condition_triggerId_Trigger_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": false, + "columns": [ + "webhookId" + ], + "schemaTo": "public", + "tableTo": "Webhook", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Condition_webhookId_Webhook_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_triggerId_Trigger_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerExecution", + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_triggerId_Trigger_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerExecution", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerExecution", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerStat", + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerStat_triggerId_Trigger_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerStat", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerStat_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserDeviceToken_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserDeviceToken_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserPersistentMenu_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Webhook", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Webhook_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Webhook", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Webhook_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WebhookExecution", + "nameExplicit": false, + "columns": [ + "webhookId" + ], + "schemaTo": "public", + "tableTo": "Webhook", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_webhookId_Webhook_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WebhookExecution", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WebhookExecution", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappBusinessAccount_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": false, + "columns": [ + "answeredByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "WhatsappCall_answeredByUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": false, + "columns": [ + "initiatedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "WhatsappCall_initiatedByUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCallPermission_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCallPermission_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappFlow_integrationWhatsappId_IntegrationWhatsapp_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappMessageTemplate_p6pSomUTTJCm_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_ownerId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHours", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHours_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursDateOverride_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "nameExplicit": true, + "columns": [ + "workingHoursId", + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "WorkingHours", + "columnsTo": [ + "id", + "workspaceId" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursDateOverride_workingHoursId_workspaceId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "nameExplicit": false, + "columns": [ + "workingHoursId" + ], + "schemaTo": "public", + "tableTo": "WorkingHours", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursInterval_workingHoursId_WorkingHours_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursMember_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursMember_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "nameExplicit": true, + "columns": [ + "workingHoursId", + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "WorkingHours", + "columnsTo": [ + "id", + "workspaceId" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursMember_workingHoursId_workspaceId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Workspace", + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Workspace_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Workspace", + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Workspace_tenantId_Tenant_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceApiToken_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMac_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMember_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMember_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsAgentResponseEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsBotMessageEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "columns": [ + "broadcastId", + "contactInboxId", + "batchId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsBroadcastEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsContactEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsConversationEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "columns": [ + "flowId", + "analyticsId", + "nodeId", + "buttonId", + "contactInboxId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsFlowNodeEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsMessageEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "columns": [ + "sequenceId", + "stepId", + "contactInboxId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsSequenceEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Attachment", + "columns": [ + "id", + "createdAt" + ], + "nameExplicit": false, + "name": "Attachment_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "columns": [ + "workspaceId", + "contactInboxId", + "throttleType", + "subjectId" + ], + "nameExplicit": true, + "name": "AutomationThrottle_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "columns": [ + "broadcastId", + "inboxId" + ], + "nameExplicit": true, + "name": "BroadcastTarget_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactActiveHourly", + "columns": [ + "workspaceId", + "hourBucket", + "contactInboxId" + ], + "nameExplicit": false, + "name": "ContactActiveHourly_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "columns": [ + "workspaceId", + "periodStart", + "contactInboxId" + ], + "nameExplicit": false, + "name": "ContactActiveMonthly_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactInboxPost", + "columns": [ + "workspaceId", + "contactInboxId", + "postId" + ], + "nameExplicit": true, + "name": "ContactInboxPost_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "columns": [ + "broadcastId", + "contactId" + ], + "nameExplicit": true, + "name": "ContactsOnBroadcast_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "columns": [ + "id", + "workspaceId" + ], + "nameExplicit": true, + "name": "ContactOnSequence_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactToTag", + "columns": [ + "contactId", + "tagId" + ], + "nameExplicit": false, + "name": "ContactToTag_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "columns": [ + "tagChannelId", + "contactInboxId" + ], + "nameExplicit": false, + "name": "ContactToTagChannel_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "columns": [ + "leaderboardId", + "contactId" + ], + "nameExplicit": false, + "name": "LeaderboardParticipant_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "columns": [ + "createdAt", + "id" + ], + "nameExplicit": false, + "name": "LeaderboardScoreEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Message", + "columns": [ + "id", + "createdAt" + ], + "nameExplicit": false, + "name": "Message_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "columns": [ + "id", + "workspaceId" + ], + "nameExplicit": true, + "name": "SequenceDispatch_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "columns": [ + "id", + "contactId" + ], + "nameExplicit": true, + "name": "TriggerContactHistory_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MessageShard", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessageShard_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ShardTimeRange_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AdsConversionEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AdsConversionRule_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIAgent", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIAgent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIConversationEmbedding_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIConversationSource", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIConversationSource_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIEmbedding", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIEmbedding_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIFile", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIFile_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIFunction", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIFunction_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIHandoverBulkRun_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIHandoverSettings_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIMCPServer", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIMCPServer_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AnalyticsEmailTopic_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Appointment", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Appointment_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentCalendar_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentCalendarAvailability_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentCalendarReminder_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentReminderDispatch_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Account", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Account_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Invitation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Invitation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Jwk", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Jwk_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Session", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Session_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "User", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "User_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Verification", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Verification_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AutomatedResponse_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "BotField", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "BotField_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Broadcast", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Broadcast_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "BroadcastRecurrence_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "BroadcastRecurrenceOccurrence_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ChannelPost", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ChannelPost_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CoexistSyncRun_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CommentAutomation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomationEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomationMiss_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomationReply_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ConnectSession", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ConnectSession_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Connection", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Connection_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Contact", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Contact_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactCustomField", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactCustomField_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactInbox", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactInbox_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactNote", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactNote_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactOnSmartDelay_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Conversation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Conversation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ConversationParticipant_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Coupon", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Coupon_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CouponTopic", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CouponTopic_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CustomField", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CustomField_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "DecisionConnection", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DecisionConnection_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "DecisionProfile", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DecisionProfile_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "DynamicImage", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DynamicImage_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "EmailTopic", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "EmailTopic_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AuditLog", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AuditLog_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CustomDomain", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CustomDomain_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "License", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "License_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "PlatformAdmin_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Tenant", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Tenant_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TenantHelpItem_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "UserQuota", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "UserQuota_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceUsage_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ErrorLog", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ErrorLog_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ExternalWebhook_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookLeadAdsAutomation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookLeadAdsLead_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookMarketingMessage_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookMarketingMessagesAuth_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "File", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "File_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Flow", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Flow_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowAnalyticsSession_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowNodeStat_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FlowRun", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowRun_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FlowVersion", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowVersion_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Folder", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Folder_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "GoogleAdsConversionEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "GoogleAdsSettings_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IgStoryAutomation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Import", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Import_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "InboundWebhook", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboundWebhook_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboundWebhookRequest_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Inbox", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Inbox_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "InboxContactStat", + "columns": [ + "inboxId" + ], + "nameExplicit": false, + "name": "InboxContactStat_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "InboxTeam", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboxTeam_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboxTeamMember_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationActiveCampaign_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationApi", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationApi_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Integration", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Integration_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationClaude_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationDeepseek_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationDrip_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationFacebookAds_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGemini_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGetResponse_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGoogleAds_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGoogleCalendar_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGoogleSheet_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationInstagram_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationKlaviyo_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMailchimp_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMailerLite_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMessenger_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMetaCatalog_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMoosend_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOpenai_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOpenaiCompatible_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOpenrouter_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOutlookCalendar_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationSendGrid_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationSmtp_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationTelegram_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationThreads_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationTiktok_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationWebchat_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationWhatsapp_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationZalo_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Leaderboard", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Leaderboard_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "LeaderboardAuditLog_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MagicLink", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MagicLink_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MediaLibraryFile_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MediaLibraryFolder_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MessageCleanup", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessageCleanup_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessagingAdOperation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessagingAdsConnection_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessengerMessageTemplate_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessengerWelcomeMessageFlow_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MetaCapiEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MetaCatalogItem_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MetaCatalogSyncRun_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MiniApp", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniApp_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniAppPublication_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniAppSubmission_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniAppUpload_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Minigame", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Minigame_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MinigameContact", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MinigameContact_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MinigamePlay", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MinigamePlay_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "PlatformCredential", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Credential_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Product", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Product_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ProductAddon", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductAddon_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ProductCategory", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductCategory_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ProductVariant", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductVariant_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductVariantOption_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "QuestionnaireAnswer_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Questionnaire", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Questionnaire_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "QuestionnaireQuestion_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "QuestionnaireSubmission_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Reflink", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Reflink_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ResponseSlaPolicy_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "SavedReply", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SavedReply_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SavedReplyImage_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Sequence", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Sequence_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "SequenceStep", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SequenceStep_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Spreadsheet", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Spreadsheet_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "SystemField", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SystemField_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Tag", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Tag_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TagChannel", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TagChannel_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TelegramChat", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TelegramChat_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Template", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Template_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TemplateInstallation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TemplateInstalledResource_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Trigger", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Trigger_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Condition", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Condition_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TriggerExecution", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TriggerExecution_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TriggerStat", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TriggerStat_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "UserDeviceToken_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "UserPersistentMenu_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Webhook", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Webhook_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WebhookExecution", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WebhookExecution_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappBusinessAccount_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappCall_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappCallPermission_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappCoexistStaging_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappFlow_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappMessageTemplate_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappSignupSession_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkingHours", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHours_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHoursDateOverride_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHoursInterval_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHoursMember_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Workspace", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Workspace_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceApiToken_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceMac_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceMember_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Message", + "nameExplicit": true, + "columns": [ + "contactInboxId", + "sourceId", + "createdAt" + ], + "nullsNotDistinct": false, + "name": "Message_source_dedup_idx", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "ProductCategory", + "nameExplicit": true, + "columns": [ + "workspaceId", + "parentId", + "name" + ], + "nullsNotDistinct": true, + "name": "ProductCategory_workspaceId_parent_name_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "ResponseSlaPolicy_workspaceId_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "nameExplicit": true, + "columns": [ + "token" + ], + "nullsNotDistinct": false, + "name": "UserDeviceToken_token_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "WorkingHours", + "nameExplicit": true, + "columns": [ + "id", + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "WorkingHours_id_workspaceId_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "nameExplicit": true, + "columns": [ + "workspaceId", + "userId" + ], + "nullsNotDistinct": false, + "name": "WorkingHoursMember_workspaceId_userId_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "nameExplicit": true, + "columns": [ + "tokenHash" + ], + "nullsNotDistinct": false, + "name": "WorkspaceApiToken_tokenHash_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "nameExplicit": true, + "columns": [ + "workspaceId", + "periodStart", + "periodEnd" + ], + "nullsNotDistinct": false, + "name": "WorkspaceMac_workspaceId_periodStart_periodEnd_unique", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "UserQuota", + "nameExplicit": false, + "columns": [ + "userId" + ], + "nullsNotDistinct": false, + "name": "UserQuota_userId_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "WorkspaceUsage_workspaceId_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "value": "(\"channel\" = 'whatsapp' AND \"integrationWhatsappId\" IS NOT NULL AND \"ctwaClid\" IS NOT NULL AND \"wabaId\" IS NOT NULL) OR (\"channel\" = 'messenger' AND \"integrationMessengerId\" IS NOT NULL) OR (\"channel\" = 'instagram' AND \"integrationInstagramId\" IS NOT NULL)", + "name": "AdsConversionEvent_channel_integration_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Broadcast", + "value": "\"parentBroadcastId\" IS NULL OR \"occurrenceAt\" IS NOT NULL", + "name": "Broadcast_occurrence_pair_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "((\"actorUserId\" IS NOT NULL)::int + (\"actorTokenId\" IS NOT NULL)::int) <= 1", + "name": "ConnectSession_actor_at_most_one", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "\"status\" IN ('pending', 'authorized', 'awaiting_selection', 'completed', 'failed', 'expired', 'cancelled')", + "name": "ConnectSession_status_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "\"purpose\" IN ('connect', 'reconnect', 'facebook_ads', 'messaging_ads', 'lead_ads', 'meta_catalog')", + "name": "ConnectSession_purpose_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "\"errorCode\" IN ('state_mismatch', 'expired', 'provider_denied', 'exchange_failed', 'provider_error', 'no_candidates', 'already_connected', 'quota_exceeded', 'trial_expired', 'internal_error')", + "name": "ConnectSession_errorCode_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "\"errorCode\" IS NULL OR \"status\" IN ('failed', 'expired', 'cancelled')", + "name": "ConnectSession_errorCode_terminal_failure_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "(\"status\" IN ('completed', 'failed', 'expired', 'cancelled')) = (\"consumedAt\" IS NOT NULL)", + "name": "ConnectSession_terminal_consumedAt_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "\"status\" NOT IN ('completed', 'failed', 'expired', 'cancelled') OR \"encryptedAuth\" IS NULL", + "name": "ConnectSession_terminal_clears_encryptedAuth_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "\"purpose\" <> 'reconnect' OR \"status\" IN ('completed', 'failed', 'expired', 'cancelled') OR \"targetConnectionId\" IS NOT NULL", + "name": "ConnectSession_active_reconnect_requires_target_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "(\n (\"kind\" = 'channel' AND \"inboxId\" IS NOT NULL AND \"channel\" IS NOT NULL)\n OR\n (\"kind\" = 'integration' AND \"inboxId\" IS NULL AND \"channel\" IS NULL AND \"integrationId\" IS NOT NULL)\n )", + "name": "Connection_kind_relation_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "NOT (\"inboxId\" IS NOT NULL AND \"integrationId\" IS NOT NULL)", + "name": "Connection_inbox_integration_exclusive_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "\"kind\" IN ('channel', 'integration')", + "name": "Connection_kind_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "\"status\" IN ('connected', 'degraded', 'needs_reauth', 'paused', 'disconnected')", + "name": "Connection_status_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "\"statusReason\" IN ('manual', 'workspace_purge', 'trial_expired', 'tenant_suspended', 'token_revoked', 'provider_revoked', 'refresh_failed', 'verify_failed', 'quota_exceeded', 'orphaned_webhook')", + "name": "Connection_statusReason_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "(\"status\" = 'connected') = (\"statusReason\" IS NULL)", + "name": "Connection_status_reason_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "(\"status\" = 'disconnected') = (\"disconnectedAt\" IS NOT NULL)", + "name": "Connection_disconnectedAt_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"status\" NOT IN ('sent', 'processed') OR (\"requestId\" IS NOT NULL AND \"sentAt\" IS NOT NULL)", + "name": "GoogleAdsConversionEvent_sent_requires_request_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"status\" <> 'sending' OR (\"claimToken\" IS NOT NULL AND \"claimedAt\" IS NOT NULL)", + "name": "GoogleAdsConversionEvent_sending_requires_claim_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"processingStatus\" IS NULL OR \"status\" IN ('sent', 'processed', 'failed')", + "name": "GoogleAdsConversionEvent_processing_status_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"failureStage\" IS NULL OR \"status\" = 'failed'", + "name": "GoogleAdsConversionEvent_failure_stage_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "(\"value\" IS NULL) = (\"currency\" IS NULL)", + "name": "GoogleAdsConversionEvent_value_currency_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"value\" IS NULL OR \"value\" >= 0", + "name": "GoogleAdsConversionEvent_value_non_negative_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "length(\"clickId\") BETWEEN 10 AND 512", + "name": "GoogleAdsConversionEvent_clickId_length_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"uploadMethod\" IN ('dataManager', 'legacy')", + "name": "GoogleAdsConversionEvent_uploadMethod_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"attempt\" >= 0 AND \"processingAttempts\" >= 0", + "name": "GoogleAdsConversionEvent_attempt_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "value": "(\"registrationStatus\" <> 'failed' OR \"registrationError\" IS NOT NULL)\n AND (\"registrationStatus\" <> 'registered' OR \"registrationError\" IS NULL)", + "name": "IntegrationWhatsapp_registrationStatus_error_consistent", + "entityType": "checks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "value": "(\"channel\" = 'whatsapp' AND \"integrationWhatsappId\" IS NOT NULL AND \"integrationMessengerId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'messenger' AND \"integrationMessengerId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'instagram' AND \"integrationInstagramId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationMessengerId\" IS NULL)", + "name": "MessagingAdOperation_channel_integration_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "value": "(\"channel\" = 'whatsapp' AND \"integrationWhatsappId\" IS NOT NULL AND \"integrationMessengerId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'messenger' AND \"integrationMessengerId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'instagram' AND \"integrationInstagramId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationMessengerId\" IS NULL)", + "name": "MessagingAdsConnection_channel_integration_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "value": "\"channel\" IN ('messenger', 'instagram', 'whatsapp')", + "name": "MetaCapiEvent_channel_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "value": "\"actionSource\" IN ('business_messaging', 'email', 'phone_call', 'chat', 'physical_store', 'system_generated', 'other')", + "name": "MetaCapiEvent_actionSource_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "value": "\"contentType\" IN ('product', 'product_group')", + "name": "MetaCapiEvent_contentType_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "value": "(\"customFieldId\" IS NULL) OR (\"systemFieldKey\" IS NULL)", + "name": "QuestionnaireQuestion_customFieldId_systemFieldKey_exclusive", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "value": "\"firstResponseTargetSeconds\" > 0 AND (\"nextResponseTargetSeconds\" IS NULL OR \"nextResponseTargetSeconds\" > 0)", + "name": "ResponseSlaPolicy_targets_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "value": "\"breachingThresholdPercent\" BETWEEN 1 AND 99", + "name": "ResponseSlaPolicy_threshold_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "value": "cardinality(\"candidatePhoneNumberIds\") > 0", + "name": "WhatsappSignupSession_candidates_not_empty", + "entityType": "checks" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "value": "\"weekday\" BETWEEN 0 AND 6", + "name": "WorkingHoursInterval_weekday_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "value": "0 <= \"startMinute\" AND \"startMinute\" < \"endMinute\" AND \"endMinute\" <= 1440", + "name": "WorkingHoursInterval_minutes_check", + "entityType": "checks" + }, + { + "values": [ + "flow", + "flowNode", + "automatedResponse", + "whatsappFlow", + "emailTopic" + ], + "name": "contactActivityReferenceType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flowExecuted", + "flowNodeExecuted", + "automatedResponseMatched", + "formCompleted", + "messageSent", + "messageDelivered", + "messageOpened", + "messageClicked" + ], + "name": "contactActivityType", + "entityType": "enums", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactActivity", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "type": "contactActivityType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "activityType", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "type": "contactActivityReferenceType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referenceType", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentReferenceId", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referenceId", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstOccurredAt", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "activityType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "referenceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "parentReferenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "referenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactActivity_reference_idx", + "schema": "public", + "table": "ContactActivity", + "entityType": "indexes" + }, + { + "columns": [ + "workspaceId", + "contactId", + "activityType", + "referenceType", + "parentReferenceId", + "referenceId" + ], + "nameExplicit": true, + "name": "ContactActivity_pkey", + "schema": "public", + "table": "ContactActivity", + "entityType": "pks" + }, + { + "value": "(\"activityType\" = 'flowExecuted' AND \"referenceType\" = 'flow' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'flowNodeExecuted' AND \"referenceType\" = 'flowNode' AND \"parentReferenceId\" <> 0) OR (\"activityType\" = 'automatedResponseMatched' AND \"referenceType\" = 'automatedResponse' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'formCompleted' AND \"referenceType\" = 'whatsappFlow' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageSent' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageDelivered' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageOpened' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageClicked' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0)", + "name": "ContactActivity_allowed_pair_check", + "schema": "public", + "table": "ContactActivity", + "entityType": "checks" + }, + { + "isRlsEnabled": false, + "name": "ContactKeywordMessage", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automatedResponseId", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "normalizedText", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "normalizedText", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "ContactKeywordMessage_text_trgm_idx", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "normalizedText", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "text_pattern_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactKeywordMessage_text_prefix_idx", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "indexes" + }, + { + "columns": [ + "workspaceId", + "contactId", + "messageId" + ], + "nameExplicit": true, + "name": "ContactKeywordMessage_pkey", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "pks" + }, + { + "isRlsEnabled": false, + "name": "ContactState", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "ContactState", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "schema": "public", + "table": "ContactState", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastDeliveredAt", + "schema": "public", + "table": "ContactState", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastDeliveredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"lastDeliveredAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactState_lastDeliveredAt_idx", + "schema": "public", + "table": "ContactState", + "entityType": "indexes" + }, + { + "columns": [ + "workspaceId", + "contactId" + ], + "nameExplicit": true, + "name": "ContactState_pkey", + "schema": "public", + "table": "ContactState", + "entityType": "pks" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicReferenceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicId", + "schema": "public", + "table": "AnalyticsEmailTopic", + "entityType": "columns" + }, + { + "nameExplicit": false, + "columns": [ + "topicId" + ], + "schemaTo": "public", + "tableTo": "EmailTopic", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_topicId_EmailTopic_id_fkey", + "schema": "public", + "table": "AnalyticsEmailTopic", + "entityType": "fks" + }, + { + "values": [ + "entireOrder", + "category", + "products" + ], + "name": "discountAppliesTo", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "everyone", + "specificCustomers" + ], + "name": "discountEligibility", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "none", + "amount", + "quantity" + ], + "name": "discountMinimumType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "percentage", + "fixedAmount", + "freeShipping" + ], + "name": "discountType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "default", + "externalLink", + "flow", + "productPage" + ], + "name": "checkoutMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "left", + "leftSpace", + "right", + "rightSpace" + ], + "name": "currencyPosition", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "default", + "flow", + "none" + ], + "name": "orderConfirmationMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "bigSquare", + "mediumRectangle" + ], + "name": "productImageSize", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "none", + "delivery", + "pickup", + "deliveryAndPickup" + ], + "name": "shippingMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "list", + "listWithoutImage", + "card", + "cardSquare", + "image", + "imageSquare" + ], + "name": "webshopProductView", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "user", + "apiToken", + "system", + "contact" + ], + "name": "orderActorType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "webshop", + "api", + "manual" + ], + "name": "orderSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "accepted", + "shipped", + "concluded", + "cancelled" + ], + "name": "orderStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "cod" + ], + "name": "paymentMethod", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "unpaid", + "paid", + "refunded" + ], + "name": "paymentStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "delivery", + "pickup" + ], + "name": "shippingType", + "entityType": "enums", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Cart", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "items", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCode", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastActivityAt", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "abandonedNotifiedAt", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_workspaceId_contactId_key", + "schema": "public", + "table": "Cart", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_contactId_idx", + "schema": "public", + "table": "Cart", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_contactInboxId_idx", + "schema": "public", + "table": "Cart", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lastActivityAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"abandonedNotifiedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_abandoned_scan_idx", + "schema": "public", + "table": "Cart", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Cart_pkey", + "schema": "public", + "table": "Cart", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Cart_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "Cart", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Cart_contactId_Contact_id_fkey", + "schema": "public", + "table": "Cart", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Cart_contactInboxId_ContactInbox_id_fkey", + "schema": "public", + "table": "Cart", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "DiscountCode", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoApply", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "discountType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountType", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "discountValue", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "discountAppliesTo", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'entireOrder'", + "generated": null, + "identity": null, + "name": "appliesTo", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productIds", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "discountMinimumType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'none'", + "generated": null, + "identity": null, + "name": "minimumType", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "minimumValue", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "usageLimit", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "usedCount", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "oncePerCustomer", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "discountEligibility", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'everyone'", + "generated": null, + "identity": null, + "name": "eligibility", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerFilter", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "startsAt", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endsAt", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"code\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCode_workspaceId_code_key", + "schema": "public", + "table": "DiscountCode", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCode_categoryId_idx", + "schema": "public", + "table": "DiscountCode", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DiscountCode_pkey", + "schema": "public", + "table": "DiscountCode", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCode_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "DiscountCode", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "DiscountCode_categoryId_ProductCategory_id_fkey", + "schema": "public", + "table": "DiscountCode", + "entityType": "fks" + }, + { + "value": "\"usedCount\" >= 0 AND (\"usageLimit\" IS NULL OR \"usedCount\" <= \"usageLimit\")", + "name": "DiscountCode_usedCount_check", + "schema": "public", + "table": "DiscountCode", + "entityType": "checks" + }, + { + "isRlsEnabled": false, + "name": "EcommerceOpenHours", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ranges", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceOpenHours_workspaceId_idx", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "EcommerceOpenHours_pkey", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EcommerceOpenHours_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "EcommerceOrderCounter", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "EcommerceOrderCounter", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "lastNumber", + "schema": "public", + "table": "EcommerceOrderCounter", + "entityType": "columns" + }, + { + "columns": [ + "workspaceId" + ], + "nameExplicit": false, + "name": "EcommerceOrderCounter_pkey", + "schema": "public", + "table": "EcommerceOrderCounter", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EcommerceOrderCounter_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "EcommerceOrderCounter", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "EcommerceSettings", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderingAvailable", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "webshopProductView", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webshopProductView", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openHoursId", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "searchProducts", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "facebookPixelId", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "abandonedCartDelayMinutes", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "abandonedCartFlowId", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productButtons", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "productImageSize", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productImageSize", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "allowRateOrders", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notifyOnCartStatusChange", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "paymentMethods", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "currencyPosition", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencyPosition", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencySymbol", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "serviceFeePercent", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "shippingMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingType", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeAddress", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingCountries", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultShippingCountry", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveryCost", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "checkoutMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "checkoutMode", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "checkoutLink", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "checkoutFlowId", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minimumOrderValue", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "orderConfirmationMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'default'", + "generated": null, + "identity": null, + "name": "orderConfirmationMode", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderConfirmationFlowId", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireName", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireEmail", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requirePhone", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireState", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireZip", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_workspaceId_key", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "openHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_openHoursId_idx", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "abandonedCartFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_abandonedCartFlowId_idx", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "checkoutFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_checkoutFlowId_idx", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderConfirmationFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_orderConfirmationFlowId_idx", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "EcommerceSettings_pkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EcommerceSettings_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "openHoursId" + ], + "schemaTo": "public", + "tableTo": "EcommerceOpenHours", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_openHoursId_EcommerceOpenHours_id_fkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "abandonedCartFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_abandonedCartFlowId_Flow_id_fkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "checkoutFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_checkoutFlowId_Flow_id_fkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "orderConfirmationFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_orderConfirmationFlowId_Flow_id_fkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "fks" + }, + { + "value": "\"serviceFeePercent\" >= 0 AND \"serviceFeePercent\" <= 100", + "name": "EcommerceSettings_serviceFeePercent_check", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "checks" + }, + { + "isRlsEnabled": false, + "name": "DiscountCodeRedemption", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCodeId", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "amount", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCodeRedemption_orderId_key", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "discountCodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCodeRedemption_discountCodeId_contactId_idx", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCodeRedemption_contactId_idx", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DiscountCodeRedemption_pkey", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCodeRedemption_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "discountCodeId" + ], + "schemaTo": "public", + "tableTo": "DiscountCode", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCodeRedemption_discountCodeId_DiscountCode_id_fkey", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "orderId" + ], + "schemaTo": "public", + "tableTo": "Order", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCodeRedemption_orderId_Order_id_fkey", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "DiscountCodeRedemption_contactId_Contact_id_fkey", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "OrderItem", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "variantId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendorId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "variantLabel", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "combination", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sku", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retailerId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendorName", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "unitPrice", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "quantity", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "stockTaken", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountPercent", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "taxPercent", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountTotal", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "taxTotal", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lineTotal", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_orderId_idx", + "schema": "public", + "table": "OrderItem", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_workspaceId_productId_idx", + "schema": "public", + "table": "OrderItem", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "vendorId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_workspaceId_vendorId_idx", + "schema": "public", + "table": "OrderItem", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "variantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_variantId_idx", + "schema": "public", + "table": "OrderItem", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_categoryId_idx", + "schema": "public", + "table": "OrderItem", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "OrderItem_pkey", + "schema": "public", + "table": "OrderItem", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "orderId" + ], + "schemaTo": "public", + "tableTo": "Order", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderItem_orderId_Order_id_fkey", + "schema": "public", + "table": "OrderItem", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderItem_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "OrderItem", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_productId_Product_id_fkey", + "schema": "public", + "table": "OrderItem", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "variantId" + ], + "schemaTo": "public", + "tableTo": "ProductVariant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_variantId_ProductVariant_id_fkey", + "schema": "public", + "table": "OrderItem", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "vendorId" + ], + "schemaTo": "public", + "tableTo": "Vendor", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_vendorId_Vendor_id_fkey", + "schema": "public", + "table": "OrderItem", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_categoryId_ProductCategory_id_fkey", + "schema": "public", + "table": "OrderItem", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "Order", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "orderSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "orderStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "paymentMethod", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'cod'", + "generated": null, + "identity": null, + "name": "paymentMethod", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "paymentStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'unpaid'", + "generated": null, + "identity": null, + "name": "paymentStatus", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subtotal", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountTotal", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingTotal", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "serviceFeeTotal", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "taxTotal", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "couponDiscount", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "total", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCodeId", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCode", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerName", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerEmail", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerPhone", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "shippingType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingType", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingAddress", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "note", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rating", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ratingComment", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "acceptedAt", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippedAt", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "concludedAt", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelReason", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "number", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_workspaceId_number_key", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_workspaceId_createdAt_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_workspaceId_status_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_contactId_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_contactInboxId_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_inboxId_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_conversationId_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "discountCodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_discountCodeId_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Order_pkey", + "schema": "public", + "table": "Order", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Order_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "Order", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_contactId_Contact_id_fkey", + "schema": "public", + "table": "Order", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_contactInboxId_ContactInbox_id_fkey", + "schema": "public", + "table": "Order", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_inboxId_Inbox_id_fkey", + "schema": "public", + "table": "Order", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_conversationId_Conversation_id_fkey", + "schema": "public", + "table": "Order", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "discountCodeId" + ], + "schemaTo": "public", + "tableTo": "DiscountCode", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_discountCodeId_DiscountCode_id_fkey", + "schema": "public", + "table": "Order", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "OrderStatusHistory", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "orderStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromStatus", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "orderStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "toStatus", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "orderActorType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorType", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorUserId", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "note", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderStatusHistory_orderId_createdAt_idx", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderStatusHistory_workspaceId_idx", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "actorUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderStatusHistory_actorUserId_idx", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "OrderStatusHistory_pkey", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "orderId" + ], + "schemaTo": "public", + "tableTo": "Order", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderStatusHistory_orderId_Order_id_fkey", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderStatusHistory_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "actorUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderStatusHistory_actorUserId_User_id_fkey", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "Vendor", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortDescription", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phone", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeAddress", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "discountPercent", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "minimumOrderValue", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openHoursId", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subcategoryId", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_workspaceId_idx", + "schema": "public", + "table": "Vendor", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "openHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_openHoursId_idx", + "schema": "public", + "table": "Vendor", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_categoryId_idx", + "schema": "public", + "table": "Vendor", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "subcategoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_subcategoryId_idx", + "schema": "public", + "table": "Vendor", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_workspaceId_name_key", + "schema": "public", + "table": "Vendor", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Vendor_pkey", + "schema": "public", + "table": "Vendor", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Vendor_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "Vendor", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "openHoursId" + ], + "schemaTo": "public", + "tableTo": "EcommerceOpenHours", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Vendor_openHoursId_EcommerceOpenHours_id_fkey", + "schema": "public", + "table": "Vendor", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Vendor_categoryId_ProductCategory_id_fkey", + "schema": "public", + "table": "Vendor", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "subcategoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Vendor_subcategoryId_ProductCategory_id_fkey", + "schema": "public", + "table": "Vendor", + "entityType": "fks" + }, + { + "value": "\"discountPercent\" >= 0 AND \"discountPercent\" <= 100", + "name": "Vendor_discountPercent_check", + "schema": "public", + "table": "Vendor", + "entityType": "checks" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "keepOriginal", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendorId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isVisible", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AuditLog_createdAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "vendorId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_vendorId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": [ + "vendorId" + ], + "schemaTo": "public", + "tableTo": "Vendor", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_vendorId_Vendor_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + } + ], + "renames": [] +} diff --git a/packages/database/drizzle/20261025020838_add_workspace_purge_indexes/migration.sql b/packages/database/drizzle/20261025020838_add_workspace_purge_indexes/migration.sql new file mode 100644 index 0000000000..aba22e7e54 --- /dev/null +++ b/packages/database/drizzle/20261025020838_add_workspace_purge_indexes/migration.sql @@ -0,0 +1,207 @@ +-- Leading indexes on the foreign keys that workspace purge cascades through. +-- Deleting a parent row fires `DELETE FROM WHERE = $1` per row; +-- without an index on every check seq-scans the child table. Nullable +-- FKs use a partial index (`WHERE IS NOT NULL`) so NULL rows add no size. +-- +-- Every index is built CONCURRENTLY, so drizzle's runner executes this file +-- outside a transaction (see scripts/run-migrations.mjs) and a failed build must +-- be safely re-runnable: each statement is preceded by a guard that drops only a +-- leftover INVALID index of the same name, and the build is `IF NOT EXISTS`. +-- HASH-partitioned tables are handled separately in +-- 20261025020711_add_workspace_purge_partitioned_indexes. +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"AIConversationEmbedding_lookup_idx"') AND NOT indisvalid) THEN + DROP INDEX "AIConversationEmbedding_lookup_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "AIConversationEmbedding_lookup_idx" ON "AIConversationEmbedding" ("workspaceId", "conversationId", "sourceId", "status");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"AIEmbedding_aiFileId_idx"') AND NOT indisvalid) THEN + DROP INDEX "AIEmbedding_aiFileId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "AIEmbedding_aiFileId_idx" ON "AIEmbedding" ("aiFileId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"ContactToTag_tagId_idx"') AND NOT indisvalid) THEN + DROP INDEX "ContactToTag_tagId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "ContactToTag_tagId_idx" ON "ContactToTag" ("tagId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"FlowRun_workspaceId_idx"') AND NOT indisvalid) THEN + DROP INDEX "FlowRun_workspaceId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "FlowRun_workspaceId_idx" ON "FlowRun" ("workspaceId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"FlowRun_flowId_idx"') AND NOT indisvalid) THEN + DROP INDEX "FlowRun_flowId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "FlowRun_flowId_idx" ON "FlowRun" ("flowId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"FlowRun_flowVersionId_idx"') AND NOT indisvalid) THEN + DROP INDEX "FlowRun_flowVersionId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "FlowRun_flowVersionId_idx" ON "FlowRun" ("flowVersionId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"FlowVersion_workspaceId_idx"') AND NOT indisvalid) THEN + DROP INDEX "FlowVersion_workspaceId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "FlowVersion_workspaceId_idx" ON "FlowVersion" ("workspaceId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"FlowVersion_flowId_idx"') AND NOT indisvalid) THEN + DROP INDEX "FlowVersion_flowId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "FlowVersion_flowId_idx" ON "FlowVersion" ("flowId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"LeaderboardParticipant_workspaceId_idx"') AND NOT indisvalid) THEN + DROP INDEX "LeaderboardParticipant_workspaceId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "LeaderboardParticipant_workspaceId_idx" ON "LeaderboardParticipant" ("workspaceId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"LeaderboardParticipant_referrerContactId_idx"') AND NOT indisvalid) THEN + DROP INDEX "LeaderboardParticipant_referrerContactId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "LeaderboardParticipant_referrerContactId_idx" ON "LeaderboardParticipant" ("referrerContactId") WHERE "referrerContactId" IS NOT NULL;--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"CommentAutomationReply_workspaceId_idx"') AND NOT indisvalid) THEN + DROP INDEX "CommentAutomationReply_workspaceId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "CommentAutomationReply_workspaceId_idx" ON "CommentAutomationReply" ("workspaceId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"LeaderboardAuditLog_workspaceId_idx"') AND NOT indisvalid) THEN + DROP INDEX "LeaderboardAuditLog_workspaceId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "LeaderboardAuditLog_workspaceId_idx" ON "LeaderboardAuditLog" ("workspaceId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"AIAgent_workspaceId_idx"') AND NOT indisvalid) THEN + DROP INDEX "AIAgent_workspaceId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "AIAgent_workspaceId_idx" ON "AIAgent" ("workspaceId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"AIFile_workspaceId_idx"') AND NOT indisvalid) THEN + DROP INDEX "AIFile_workspaceId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "AIFile_workspaceId_idx" ON "AIFile" ("workspaceId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"Flow_workspaceId_idx"') AND NOT indisvalid) THEN + DROP INDEX "Flow_workspaceId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "Flow_workspaceId_idx" ON "Flow" ("workspaceId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"InboxTeam_workspaceId_idx"') AND NOT indisvalid) THEN + DROP INDEX "InboxTeam_workspaceId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "InboxTeam_workspaceId_idx" ON "InboxTeam" ("workspaceId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"SavedReply_workspaceId_idx"') AND NOT indisvalid) THEN + DROP INDEX "SavedReply_workspaceId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SavedReply_workspaceId_idx" ON "SavedReply" ("workspaceId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"SavedReplyImage_workspaceId_idx"') AND NOT indisvalid) THEN + DROP INDEX "SavedReplyImage_workspaceId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "SavedReplyImage_workspaceId_idx" ON "SavedReplyImage" ("workspaceId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"AnalyticsEmailTopic_contactId_idx"') AND NOT indisvalid) THEN + DROP INDEX "AnalyticsEmailTopic_contactId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "AnalyticsEmailTopic_contactId_idx" ON "AnalyticsEmailTopic" ("contactId") WHERE "contactId" IS NOT NULL;--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"AnalyticsEmailTopic_conversationId_idx"') AND NOT indisvalid) THEN + DROP INDEX "AnalyticsEmailTopic_conversationId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "AnalyticsEmailTopic_conversationId_idx" ON "AnalyticsEmailTopic" ("conversationId") WHERE "conversationId" IS NOT NULL;--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"AnalyticsEmailTopic_contactInboxId_idx"') AND NOT indisvalid) THEN + DROP INDEX "AnalyticsEmailTopic_contactInboxId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "AnalyticsEmailTopic_contactInboxId_idx" ON "AnalyticsEmailTopic" ("contactInboxId") WHERE "contactInboxId" IS NOT NULL;--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"FacebookLeadAdsLead_contactId_idx"') AND NOT indisvalid) THEN + DROP INDEX "FacebookLeadAdsLead_contactId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "FacebookLeadAdsLead_contactId_idx" ON "FacebookLeadAdsLead" ("contactId") WHERE "contactId" IS NOT NULL;--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"MiniAppUpload_contactId_idx"') AND NOT indisvalid) THEN + DROP INDEX "MiniAppUpload_contactId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "MiniAppUpload_contactId_idx" ON "MiniAppUpload" ("contactId") WHERE "contactId" IS NOT NULL;--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"MinigameContact_referrerContactId_idx"') AND NOT indisvalid) THEN + DROP INDEX "MinigameContact_referrerContactId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "MinigameContact_referrerContactId_idx" ON "MinigameContact" ("referrerContactId") WHERE "referrerContactId" IS NOT NULL;--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"MinigameContact_contactInboxId_idx"') AND NOT indisvalid) THEN + DROP INDEX "MinigameContact_contactInboxId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "MinigameContact_contactInboxId_idx" ON "MinigameContact" ("contactInboxId") WHERE "contactInboxId" IS NOT NULL;--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"QuestionnaireSubmission_contactId_idx"') AND NOT indisvalid) THEN + DROP INDEX "QuestionnaireSubmission_contactId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "QuestionnaireSubmission_contactId_idx" ON "QuestionnaireSubmission" ("contactId");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"QuestionnaireSubmission_conversationId_idx"') AND NOT indisvalid) THEN + DROP INDEX "QuestionnaireSubmission_conversationId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "QuestionnaireSubmission_conversationId_idx" ON "QuestionnaireSubmission" ("conversationId") WHERE "conversationId" IS NOT NULL;--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"QuestionnaireSubmission_currentQuestionId_idx"') AND NOT indisvalid) THEN + DROP INDEX "QuestionnaireSubmission_currentQuestionId_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "QuestionnaireSubmission_currentQuestionId_idx" ON "QuestionnaireSubmission" ("currentQuestionId") WHERE "currentQuestionId" IS NOT NULL; diff --git a/packages/database/drizzle/20261025020838_add_workspace_purge_indexes/snapshot.json b/packages/database/drizzle/20261025020838_add_workspace_purge_indexes/snapshot.json new file mode 100644 index 0000000000..91d9c409a1 --- /dev/null +++ b/packages/database/drizzle/20261025020838_add_workspace_purge_indexes/snapshot.json @@ -0,0 +1,62067 @@ +{ + "id": "2e489004-42f1-4a07-83d3-c6cd07aa47ca", + "prevIds": [ + "9ca0f238-71f7-4aba-a8a8-8bdc3b0bb367" + ], + "version": "8", + "dialect": "postgres", + "ddl": [ + { + "schema": "public", + "values": [ + "pending", + "sent", + "failed", + "skipped_no_scope", + "skipped_region" + ], + "name": "adsConversionCapiStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "automatic", + "rule", + "trigger" + ], + "name": "adsConversionEventSource", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "whatsapp", + "facebook", + "messenger", + "instagram" + ], + "name": "adsConversionChannel", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "lead", + "purchase" + ], + "name": "adsConversionEventType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "success", + "error", + "processing" + ], + "name": "aiConversationEmbeddingStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "processing", + "success", + "error" + ], + "name": "aiConversationSourceStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "document", + "image", + "url", + "web_search" + ], + "name": "aiConversationSourceType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "success", + "error", + "processing" + ], + "name": "aiEmbeddingStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "enable", + "disable" + ], + "name": "aiHandoverBulkAction", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "running", + "cancelling", + "completed", + "failed", + "cancelled" + ], + "name": "aiHandoverBulkStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "automated_response", + "ai_agent", + "flow", + "none" + ], + "name": "analyticsBotResponseType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "success", + "fallback" + ], + "name": "analyticsBotResult", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "flow", + "agent", + "fallback" + ], + "name": "analyticsBotRouteType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "message:sent", + "message:delivered", + "message:seen", + "message:failed", + "flow:clicked" + ], + "name": "analyticsBroadcastEventType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "contact_created", + "contact_deleted", + "contact_blocked" + ], + "name": "analyticsContactEventType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "bot", + "human" + ], + "name": "analyticsContactSenderType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "conversation_created", + "conversation_assigned", + "conversation_unassigned", + "conversation_transferred_to_human", + "conversation_transferred_to_bot", + "conversation_followed", + "conversation_unfollowed", + "conversation_archived", + "conversation_unarchived" + ], + "name": "analyticsConversationEventType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "message_human_sent", + "message_bot_sent" + ], + "name": "analyticsMessageEventType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "processing", + "ingested", + "failed" + ], + "name": "analyticsStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "synced", + "failed" + ], + "name": "appointmentExternalSyncStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "inPerson", + "phoneCall", + "onlineMeeting" + ], + "name": "appointmentLocationTypeSnapshot", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "scheduled", + "cancelled" + ], + "name": "appointmentStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "inPerson", + "phoneCall", + "onlineMeeting" + ], + "name": "appointmentLocationType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "rollingDays", + "dateRange", + "specificDay", + "anyFutureDate" + ], + "name": "appointmentScheduleWindowType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "minutes", + "hours", + "days" + ], + "name": "appointmentReminderTimingUnit", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "sent", + "cancelled", + "failed" + ], + "name": "appointmentReminderDispatchStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "image", + "video", + "audio", + "gif", + "file" + ], + "name": "fileType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "inbound", + "outbound" + ], + "name": "automatedResponseType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "defaultReply" + ], + "name": "automationThrottleType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "now", + "future", + "recurring" + ], + "name": "broadcastScheduleType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "scheduled", + "sent", + "sending", + "cancelled", + "draft", + "failed", + "recurring" + ], + "name": "broadcastStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "created", + "skipped", + "missed" + ], + "name": "broadcastOccurrenceOutcome", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "catchUpSuperseded", + "paused", + "draft", + "blockedOwner", + "planLimit", + "noTargets", + "undeliverable", + "excludedDate" + ], + "name": "broadcastOccurrenceReason", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "whatsapp", + "messenger", + "instagram" + ], + "name": "coexistChannel", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "contacts", + "messages" + ], + "name": "coexistMessengerSyncPhase", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "init", + "running", + "succeeded", + "failed", + "partial", + "waiting" + ], + "name": "coexistRunStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "coexist", + "contact_scan" + ], + "name": "coexistRunType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "messenger", + "instagram", + "instagramFacebook", + "threads", + "tiktok" + ], + "name": "commentAutomationType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "equal", + "contain" + ], + "name": "commentExcludeKeywordsType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "sent", + "failed" + ], + "name": "commentAutomationEventStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "public", + "private" + ], + "name": "commentAutomationReplyChannel", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "AIAgent", + "text", + "flow", + "none" + ], + "name": "commentAutomationReplyType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "outsideSchedule", + "postNotMatched", + "commentIsReply", + "keywordsNotMatched", + "mentionCountNotMatched", + "contactNotNew", + "alreadyRepliedOnPost", + "engagedOnOtherPost" + ], + "name": "commentAutomationMissReason", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "male", + "female", + "unknown" + ], + "name": "gender", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "captured", + "unavailable", + "failed" + ], + "name": "contactInboxProfileSnapshotState", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "text", + "location", + "refLink", + "image", + "video", + "audio", + "gif", + "file", + "storyMention" + ], + "name": "lastUserInputType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "inboundReceived", + "standbyReceived", + "controlPassed", + "controlTaken", + "taken", + "released", + "passed", + "serviceSent", + "serviceRejected" + ], + "name": "threadControlEvent", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "owned", + "standby", + "idle" + ], + "name": "threadControlState", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "scheduled", + "completed", + "failed", + "canceled" + ], + "name": "ContactOnSmartDelayStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "waitNode", + "followUp", + "quickReplyFollowUp" + ], + "name": "ContactOnSmartDelayType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "active", + "archived" + ], + "name": "couponTopicStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "shortText", + "email", + "phoneNumber", + "number", + "date", + "datetime", + "boolean", + "longText" + ], + "name": "customFieldType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "enabled", + "disabled" + ], + "name": "DecisionConnectionStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "passed", + "failed" + ], + "name": "DecisionConnectionTestStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "typesafe", + "systemOneCompatible", + "openrouterDecision" + ], + "name": "DecisionProviderKind", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "enabled", + "disabled" + ], + "name": "DecisionProfileStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "import", + "generic", + "export" + ], + "name": "fileContextType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "uploaded", + "failed" + ], + "name": "fileStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "tag", + "flow", + "customField", + "automatedResponse", + "trigger", + "webhook", + "sequence", + "emailTopic", + "fbComment", + "igComment", + "igStory", + "outboundAutomatedResponse" + ], + "name": "folderType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "gclid", + "gbraid" + ], + "name": "googleAdsClickIdType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "flowStep", + "triggerAction" + ], + "name": "googleAdsEventSource", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "sending", + "sent", + "processed", + "failed", + "skipped_no_account", + "skipped_expired" + ], + "name": "googleAdsEventStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "delivery", + "processing", + "timeout" + ], + "name": "googleAdsFailureStage", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "processing", + "success", + "partial_success", + "failed", + "unknown", + "timed_out" + ], + "name": "googleAdsProcessingStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "storyReply", + "storyMention" + ], + "name": "igStoryAutomationTrigger", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "instagram", + "instagramFacebook" + ], + "name": "igStoryAutomationType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "csv", + "xlsx", + "xls", + "json" + ], + "name": "importFormat", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "processing", + "completed", + "failed" + ], + "name": "importStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "contacts", + "coupons", + "products", + "flow" + ], + "name": "importType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "received", + "processing", + "processed", + "completedWithErrors", + "skipped", + "failed" + ], + "name": "inboundWebhookRequestStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "oauth", + "fbe" + ], + "name": "metaCatalogAuthMode", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "active", + "invalid" + ], + "name": "metaCatalogConnectionStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "idle", + "queued", + "running", + "succeeded", + "partial", + "failed" + ], + "name": "metaCatalogImportStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "metaNative", + "browserWhisper" + ], + "name": "whatsappCallRecordingMode", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "metaNative", + "browserWhisper" + ], + "name": "whatsappCallTranscriptionMode", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending_verification", + "registered", + "failed" + ], + "name": "whatsappRegistrationStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "messenger", + "instagram", + "whatsapp", + "zalo", + "telegram", + "tiktok", + "threads", + "email", + "gamification" + ], + "name": "leaderboardPlatform", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "draft", + "active", + "paused", + "finished" + ], + "name": "leaderboardStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "adjust", + "resetOne", + "resetAll", + "ban", + "unban" + ], + "name": "leaderboardAuditAction", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "rule", + "flow", + "referral", + "manual", + "reset" + ], + "name": "leaderboardScoreSource", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "text", + "location", + "refLink" + ], + "name": "contentType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "message", + "comment" + ], + "name": "messageKind", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "incoming", + "outgoing", + "activity" + ], + "name": "messageType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "bot", + "contact", + "system", + "user", + "api" + ], + "name": "senderType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "processing", + "completed", + "failed" + ], + "name": "MessageCleanupStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "whatsapp", + "messenger", + "instagram" + ], + "name": "messagingAdChannel", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "campaignCreated", + "adSetCreated", + "creativeCreated", + "adCreated", + "failed" + ], + "name": "messagingAdCreateState", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "draft", + "publishing", + "published", + "pausing", + "paused", + "deleting", + "deleted", + "publishFailed" + ], + "name": "messagingAdPublishState", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "push", + "import" + ], + "name": "metaCatalogItemDirection", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "all", + "category", + "selected" + ], + "name": "metaCatalogSyncScope", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "queued", + "running", + "succeeded", + "partial", + "failed" + ], + "name": "metaCatalogSyncStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "web" + ], + "name": "miniAppSubmissionSource", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "submitted" + ], + "name": "miniAppUploadStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "luckyWheel", + "jackpot", + "gashapon", + "drawLots", + "scratchOff" + ], + "name": "minigameType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "dont_track", + "track" + ], + "name": "inventoryPolicy", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "text", + "number", + "email", + "phone", + "multipleChoice", + "date", + "datetime", + "image", + "file", + "location", + "websiteLink" + ], + "name": "questionnaireQuestionType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "inProgress", + "completed", + "cancelled", + "failed", + "timeout" + ], + "name": "questionnaireSubmissionStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "refLink", + "qrCode" + ], + "name": "ReflinkType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "me" + ], + "name": "SystemFieldType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "creator", + "administrator", + "member", + "restricted", + "left", + "kicked" + ], + "name": "telegramBotChatStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "private", + "group", + "supergroup", + "channel" + ], + "name": "telegramChatType", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "pending", + "installing", + "completed", + "partial", + "failed" + ], + "name": "templateInstallationStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "flows", + "products", + "aiFunctions", + "aiAgents", + "calendars", + "webchats", + "keywords", + "entryPointLinks", + "triggers", + "fbCommentAutomations", + "settings", + "customFields", + "tags", + "productCategories" + ], + "name": "templateResourceCategory", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "ios", + "android" + ], + "name": "devicePlatform", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "userInitiated", + "businessInitiated" + ], + "name": "whatsappCallDirection", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "completed", + "failed", + "rejected", + "canceled" + ], + "name": "whatsappCallOutcome", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "ringing", + "accepted", + "rejected", + "completed", + "failed" + ], + "name": "whatsappCallStatus", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "accept", + "reject" + ], + "name": "whatsappCallPermissionResponse", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "allTime", + "oncePerHour", + "oncePerDay" + ], + "name": "defaultReplyFrequency", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "full", + "read_only" + ], + "name": "WorkspaceApiTokenPermission", + "entityType": "enums" + }, + { + "schema": "public", + "values": [ + "owner", + "agent" + ], + "name": "workspaceMemberRole", + "entityType": "enums" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MessageShard", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ShardTimeRange", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AdsConversionEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AdsConversionRule", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIAgent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIConversationEmbedding", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIConversationSource", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIEmbedding", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIFile", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIFunction", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIHandoverBulkRun", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIHandoverSettings", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AIMCPServer", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsAgentResponseEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsBotMessageEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsBroadcastEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsContactEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsConversationEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsFlowNodeEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsMessageEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsSequenceEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsEmailTopic", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AnalyticsManifestStatus", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Appointment", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AppointmentCalendar", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AppointmentCalendarAvailability", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AppointmentCalendarReminder", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AppointmentReminderDispatch", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Attachment", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Account", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Invitation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Jwk", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Session", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "User", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Verification", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AutomatedResponse", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AutomationThrottle", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "BotField", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Broadcast", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "BroadcastRecurrence", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "BroadcastRecurrenceOccurrence", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "BroadcastTarget", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ChannelPost", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CoexistSyncRun", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CommentAutomation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CommentAutomationEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CommentAutomationMiss", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CommentAutomationReply", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ConnectSession", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Connection", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Contact", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactActiveHourly", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactActiveMonthly", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactCustomField", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactInbox", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactInboxPost", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactNote", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactOnBroadcast", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactOnSequence", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactOnSmartDelay", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactToTag", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ContactToTagChannel", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Conversation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ConversationParticipant", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Coupon", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CouponTopic", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CustomField", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "DecisionConnection", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "DecisionProfile", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "DynamicImage", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "EmailTopic", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "AuditLog", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "CustomDomain", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "License", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "PlatformAdmin", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Tenant", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TenantHelpItem", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "UserQuota", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkspaceUsage", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ErrorLog", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ExternalWebhook", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FacebookLeadAdsAutomation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FacebookLeadAdsLead", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FacebookMarketingMessage", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FacebookMarketingMessagesAuth", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "File", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Flow", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FlowAnalyticsSession", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FlowNodeStat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FlowRun", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "FlowVersion", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Folder", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "GoogleAdsConversionEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "GoogleAdsSettings", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IgStoryAutomation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Import", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "InboundWebhook", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "InboundWebhookRequest", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Inbox", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "InboxContactStat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "InboxTeam", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "InboxTeamMember", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationActiveCampaign", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationApi", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Integration", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationClaude", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationDeepseek", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationDrip", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationFacebookAds", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationGemini", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationGetResponse", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationGoogleAds", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationGoogleCalendar", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationGoogleSheet", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationInstagram", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationKlaviyo", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationMailchimp", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationMailerLite", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationMessenger", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationMetaCatalog", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationMoosend", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationOpenai", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationOpenaiCompatible", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationOpenrouter", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationOutlookCalendar", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationSendGrid", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationSmtp", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationTelegram", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationThreads", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationTiktok", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationWebchat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationWhatsapp", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "IntegrationZalo", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Leaderboard", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "LeaderboardAuditLog", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "LeaderboardParticipant", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "LeaderboardScoreEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MagicLink", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MagicLinkStat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MediaLibraryFile", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MediaLibraryFolder", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Message", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MessageCleanup", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MessagingAdOperation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MessagingAdsConnection", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MessengerMessageTemplate", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MessengerWelcomeMessageFlow", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MetaCapiEvent", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MetaCatalogItem", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MetaCatalogSyncRun", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MiniApp", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MiniAppPublication", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MiniAppSubmission", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MiniAppUpload", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Minigame", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MinigameContact", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "MinigamePlay", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "PlatformCredential", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Product", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ProductAddon", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ProductCategory", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ProductVariant", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ProductVariantOption", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "QuestionnaireAnswer", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Questionnaire", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "QuestionnaireQuestion", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "QuestionnaireSubmission", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "RefLinkStat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Reflink", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "ResponseSlaPolicy", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "SavedReply", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "SavedReplyImage", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Sequence", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "SequenceDispatch", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "SequenceStep", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Spreadsheet", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "SystemField", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Tag", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TagChannel", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TelegramChat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Template", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TemplateInstallation", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TemplateInstalledResource", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Trigger", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Condition", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TriggerContactHistory", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TriggerExecution", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "TriggerStat", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "UserDeviceToken", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "UserPersistentMenu", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Webhook", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WebhookExecution", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappBusinessAccount", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappCall", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappCallPermission", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappCoexistStaging", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappFlow", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappMessageTemplate", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WhatsappSignupSession", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkingHours", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkingHoursDateOverride", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkingHoursInterval", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkingHoursMember", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "Workspace", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkspaceApiToken", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkspaceMac", + "entityType": "tables" + }, + { + "schema": "public", + "isRlsEnabled": false, + "name": "WorkspaceMember", + "entityType": "tables" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "5432", + "generated": null, + "identity": null, + "name": "port", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "database", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credentialRef", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "'disable'", + "generated": null, + "identity": null, + "name": "sslMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isMain", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shardKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "readHost", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "readPort", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shardId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "adsConversionChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'whatsapp'", + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "adsConversionEventSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "adsConversionEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ctwaClid", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contents", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceEventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "adsConversionCapiStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "capiStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiSentAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "adsConversionChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationFacebookAdsId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "adsConversionEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "trigger", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "markAs", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actionPrompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "actionRules", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "messages", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isDefault", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isRichResponse", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "tools", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "webSearchAuthorizedDomains", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "models", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIAgent", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chunkIndex", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "vector(1536)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "embedding", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "aiConversationEmbeddingStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attachmentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "aiConversationSourceType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "aiConversationSourceStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentHash", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "summary", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIConversationSource", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "vector(1536)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "embedding", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "aiEmbeddingStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIEmbedding", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiFileId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purpose", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dataCollect", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outputMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIFunction", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "aiHandoverBulkAction", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "aiHandoverBulkStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "message", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestedByUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastHeartbeatAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pausedUntil", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chunkSeq", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cursorContactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inFlightFromId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inFlightToId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "scheduleEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timeRanges", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "gotoFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "returnMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "pauseBotWaitingForStaff", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "applyToAllCustomers", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "applyToAllRevision", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "applyToAllMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "applyToAllRequestedByUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "availableTools", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "selectedTools", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AIMCPServer", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "awaitingSince", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "measuredFrom", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingResponseSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isFirstResponse", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slaTargetSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slaMet", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasResponse", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "analyticsBotResponseType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "analyticsBotRouteType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "routeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "analyticsBotResult", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "result", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiProvider", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "analyticsBroadcastEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "batchId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "analyticsContactEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "analyticsContactSenderType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "analyticsConversationEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromAssignee", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "toAssignee", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "analyticsId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "buttonId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "analyticsMessageEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "analyticsContactSenderType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstSeenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSeenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seenCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstClickedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastClickedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clickCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsManifestStatus", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "objectKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsManifestStatus", + "type": "analyticsStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsManifestStatus", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsManifestStatus", + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ingestedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AnalyticsManifestStatus", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inviteeTimezone", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "appointmentStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'scheduled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "appointmentLocationTypeSnapshot", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationDetail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventIntegrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventProviderCalendarId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "appointmentExternalSyncStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalSyncStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Appointment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "30", + "generated": null, + "identity": null, + "name": "durationMinutes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bufferAfterMinutes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "appointmentLocationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationDetail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "appointmentScheduleWindowType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'rollingDays'", + "generated": null, + "identity": null, + "name": "scheduleWindowType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "scheduleWindowConfig", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxAppointmentsPerUser", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "dailyLimitEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxPerDay", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowGroupMeeting", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxPerSlot", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "confirmationMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "confirmationFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancellationFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalConnectionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventTitleTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventDescriptionTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventAttendeesTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicLinkSlug", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "weekday", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startMinute", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endMinute", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timingValue", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "type": "appointmentReminderTimingUnit", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timingUnit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appointmentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reminderConfigId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "appointmentReminderDispatchStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "jobId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sentAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedReason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageCreatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "fileType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "width", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "height", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnailPath", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originPath", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Attachment", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "providerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accessToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accessTokenExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refreshToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refreshTokenExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "password", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Account", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Invitation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "invitedBy", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Jwk", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Jwk", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Jwk", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Jwk", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Jwk", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "privateKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Jwk", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ipAddress", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Session", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "emailVerified", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isAnonymous", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "mustChangePassword", + "entityType": "columns" + }, + { + "schema": "public", + "table": "User", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Verification", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Verification", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Verification", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Verification", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "identifier", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Verification", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Verification", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "keywords", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "type": "automatedResponseType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'inbound'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "type": "automationThrottleType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "throttleType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subjectId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastTriggeredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "customFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BotField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateData", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'channel'", + "generated": null, + "identity": null, + "name": "targetMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "broadcastStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "broadcastScheduleType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schedulesType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schedulesAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactFilter", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subaction", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handoffCompletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "resumeCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "audienceRangeStart", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "audienceRangeEnd", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendRatePerMinute", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentBroadcastId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Broadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurrenceAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rule", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextRunAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountedThroughAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "occurrenceCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastOccurrenceAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pausedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recurrenceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "localSlot", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurrenceAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "broadcastOccurrenceOutcome", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outcome", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "broadcastOccurrenceReason", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "childBroadcastId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "materializedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "supersededCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateData", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceAccountId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalPostId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "caption", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mediaType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permalink", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publishedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadataFetchedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ChannelPost", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadataAttemptedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "coexistChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "coexistRunType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'coexist'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "coexistRunStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'init'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerSource", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastHeartbeatAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalScan", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentScan", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentPageNumber", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedContactCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedMessageCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastPhase", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastChunkOrder", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "syncProgress", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "coexistMessengerSyncPhase", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'contacts'", + "generated": null, + "identity": null, + "name": "messengerSyncPhase", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pendingPatches", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scanFromAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestedByUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resumeCursor", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "commentAutomationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'messenger'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "repliesCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sentCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "deliveredCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seenCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clickedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "missedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "post", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"text\",\"value\":\"\"}'", + "generated": null, + "identity": null, + "name": "privateReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"none\",\"value\":null}'", + "generated": null, + "identity": null, + "name": "publicReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "includeKeywords", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "excludeKeywords", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "commentExcludeKeywordsType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'contain'", + "generated": null, + "identity": null, + "name": "excludeKeywordsType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"replyToNewContactsOnly\":false,\"replyOncePerUserPerPost\":false,\"likeUserComment\":false,\"replyToUsersWhoCommentedOnOtherPosts\":true,\"ignoreCommentReplies\":true,\"trackUserTags\":false}'", + "generated": null, + "identity": null, + "name": "options", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"all\":false,\"hasPhoneNumber\":false,\"hasImage\":false,\"hasVideo\":false,\"hasLink\":false,\"hasKeywords\":false,\"hasGif\":false,\"hasEmoji\":false,\"keywords\":[],\"showCommentsAfter\":\"none\"}'", + "generated": null, + "identity": null, + "name": "hideComments", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"immediately\",\"value\":0}'", + "generated": null, + "identity": null, + "name": "replyAfter", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentText", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "commentAutomationReplyChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replyChannel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "commentAutomationReplyType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replyType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replyText", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "commentAutomationEventStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorDetail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "httpCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentText", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "commentAutomationMissReason", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purpose", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "targetConnectionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorTokenId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "platformOwnerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originHost", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "returnUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stateNonceHash", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'authorize'", + "generated": null, + "identity": null, + "name": "step", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextAction", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAuth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "targets", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "targetClaims", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "resultConnectionIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "results", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConnectSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "consumedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "displayName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'connected'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "statusReason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "authExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connectedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Connection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disconnectedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "avatar", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumber", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "emailVerified", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "emailOptIn", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "CASE\n WHEN \"firstName\" IS NULL AND \"lastName\" IS NULL THEN NULL\n WHEN \"firstName\" IS NULL THEN \"lastName\"\n WHEN \"lastName\" IS NULL THEN \"firstName\"\n ELSE \"firstName\" || ' ' || \"lastName\"\n END", + "type": "stored" + }, + "identity": null, + "name": "fullName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "gender", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "gender", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastReadAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ref", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "city", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "location", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locale", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subscribedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastSubscribedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "blockedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalTagged", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalNewTagged", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Contact", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveHourly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveHourly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveHourly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveHourly", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hourBucket", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveHourly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceMacId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactCustomField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactCustomField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactCustomField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactCustomField", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactCustomField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactCustomField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originalContactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "followsBusiness", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessFollowsContact", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountVerified", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "followerCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "contactInboxProfileSnapshotState", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "profileSnapshotState", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "profileSnapshotAttempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "profileSnapshotNextAttemptAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "personaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactLastReadAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstInteractionAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastMessageAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastIncomingMessageAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastOutboundMessageAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referral", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastCommentMessageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastCommentMessageAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "consecutiveFailedReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastInputFailure", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastErrorLog", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastBtnTitle", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUserInput", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "lastUserInputType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUserInputType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webchatParentUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceParentUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceUsername", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceIdentityHistory", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "threadControlState", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlState", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadOwnerRole", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlUpdatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "threadControlEvent", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlLastEvent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadOwnerAppId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadOwnerExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadPreviousOwnerAppId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInboxPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInboxPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInboxPost", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactInboxPost", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactNote", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactNote", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactNote", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactNote", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactNote", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactNote", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdById", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "sent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "case when \"seenAt\" is null then false when \"deliveredAt\" is null then false else \"seenAt\" >= \"deliveredAt\" end", + "type": "stored" + }, + "identity": null, + "name": "isRead", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "enrolledAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextRunAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastStepId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextStepId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockOwner", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appointmentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "ContactOnSmartDelayType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "type": "ContactOnSmartDelayStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactToTag", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactToTag", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagChannelId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "botEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botResumeAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "archivedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "additionalAttributes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactLastReadAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agentLastReadAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiContextLastMessageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastActivityAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "followed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedInboxTeamId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastStep", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminRepliedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactRepliedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "awaitingHumanReplySince", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "awaitingHumanReplyClosedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedUserAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseDueAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseSlaBreachingAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Conversation", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseSlaTargetSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuedContactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Coupon", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "usedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "couponTopicStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasEverHadCoupon", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CouponTopic", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdById", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "customFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "showInInbox", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "DecisionProviderKind", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "providerKind", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endpoint", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credential", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modelCatalog", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultModel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "DecisionConnectionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'enabled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "DecisionConnectionTestStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastTestStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionConnection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastTestedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "DecisionProfileStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'enabled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connectionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contract", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thresholdConfig", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "globalRouterEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DecisionProfile", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "globalRouterConfig", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "data", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "backgroundUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "DynamicImage", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sendsTotal", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "deliveredsTotal", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seensTotal", + "entityType": "columns" + }, + { + "schema": "public", + "table": "EmailTopic", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clicksTotal", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "detail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ipAddress", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "AuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "domain", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verifiedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfHostnameId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfOwnershipValue", + "entityType": "columns" + }, + { + "schema": "public", + "table": "CustomDomain", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfAcmeValue", + "entityType": "columns" + }, + { + "schema": "public", + "table": "License", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "License", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "License", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "License", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "licenseId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "License", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns" + }, + { + "schema": "public", + "table": "License", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'super-admin'", + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disabledReason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brandName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logoLightPath", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logoDarkPath", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "faviconPath", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customCss", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customJs", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "theme", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storageUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "policyUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "termsOfServiceUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "signupEmailTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "forgotPasswordEmailTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "magicLinkEmailTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountCredentialsEmailTemplate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tenant", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hiddenChannels", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "icon", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactsLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "contactsUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspacesLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "workspacesUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelsLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "channelsUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "teamMembersLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "teamMembersUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "macLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botMessagesLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "monthlyBotMessagesLimit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "monthlyBotMessagesUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "monthlyBotMessagesPeriodStart", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesTopUpGranted", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "whiteLabel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "ssoSaml", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "saasMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "planName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "planStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "selectedTrialPlanId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelsTornDownAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserQuota", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "syncedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "contactsUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "channelsUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "teamMembersUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macUsed", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "syncedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "detail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "httpCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ErrorLog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stackTrace", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'make'", + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "event", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "fieldMapping", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "leadsHandledCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leadgenId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencyOffset", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "budgetType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "budgetMinorUnits", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "campaignId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "facebookUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "facebookUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "fileContextType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contextType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileSize", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "fileStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "meta", + "entityType": "columns" + }, + { + "schema": "public", + "table": "File", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enableInInbox", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentVersionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "draftVersionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Flow", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "analyticsId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "buttonId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowRun", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "nodes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "edges", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isDraft", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isLatest", + "entityType": "columns" + }, + { + "schema": "public", + "table": "FlowVersion", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startNodeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "folderType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isTrash", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Folder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "paths", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationGoogleAdsId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "loginCustomerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionCustomerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionCategory", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lookbackWindowDays", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "googleAdsEventSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scopeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "googleAdsClickIdType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickIdType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "googleClickReceivedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transactionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "options", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadMethod", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "googleAdsEventStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sentAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "googleAdsFailureStage", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failureStage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "googleAdsProcessingStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingCheckedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingAttempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextProcessingCheckAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingDetail", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "settings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "igStoryAutomationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "igStoryAutomationTrigger", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'storyReply'", + "generated": null, + "identity": null, + "name": "trigger", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "repliesCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "story", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"none\",\"value\":null}'", + "generated": null, + "identity": null, + "name": "reply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "includeKeywords", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "importType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "importFormat", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "format", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "importStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "meta", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "processedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "errorSample", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Import", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxResolution", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "identifiers", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fieldMappings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sampleJson", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "requestCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboundWebhookId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idempotencyKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clientIp", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "inboundWebhookRequestStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'received'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "skipReason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fieldErrors", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actionResults", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'connected'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "markReadOnOutbound", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disconnectedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disconnectReason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Inbox", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlSeenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxContactStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxContactStat", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalContacts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxContactStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeam", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeam", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeam", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeam", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeam", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxTeamId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenHash", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenPrefix", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callbackUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationApi", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Integration", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Integration", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Integration", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Integration", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Integration", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "loginCustomerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "descriptiveName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencyCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionCustomerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "acceptedCustomerDataTerms", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionsSyncedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "setupError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "setupErrorAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'primary'", + "generated": null, + "identity": null, + "name": "providerCalendarId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userInfo", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "igId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "username", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistAiReadsSyncedHistory", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiTestEventCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'instagram'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userInfo", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "personas", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "personaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistAiReadsSyncedHistory", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiTestEventCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "syncTagEnabledAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handoverResumeFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAuth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "metaCatalogAuthMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'oauth'", + "generated": null, + "identity": null, + "name": "authMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "metaCatalogConnectionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "metaCatalogImportStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'idle'", + "generated": null, + "identity": null, + "name": "importStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importTotalCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importFailedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "importError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastImportedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'VND'", + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReplyVoice", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "voice", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiAgentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "baseURL", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultModel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "preset", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'primary'", + "generated": null, + "identity": null, + "name": "providerCalendarId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromAddress", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadsUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "username", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enable", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "authorizedDomains", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brandColor", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hideHeader", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "showLogo", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hideMessageInput", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customCss", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumberId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "displayPhoneNumber", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callingEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "inboundCallsEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callHours", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "callRecordingEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "90", + "generated": null, + "identity": null, + "name": "callRecordingRetentionDays", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "callTranscriptionEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "whatsappCallRecordingMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'metaNative'", + "generated": null, + "identity": null, + "name": "callRecordingMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "whatsappCallTranscriptionMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'metaNative'", + "generated": null, + "identity": null, + "name": "callTranscriptionMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callAnnouncementLanguage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callRecordingPurpose", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistAiReadsSyncedHistory", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isCoexist", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "platformType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "historyDeclined", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiTestEventCode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "whatsappRegistrationStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending_verification'", + "generated": null, + "identity": null, + "name": "registrationStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "registrationError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verificationCodeRequestedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handoverResumeFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "oaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fallbackFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "syncTagEnabledAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "coverImageUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startsAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endsAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "leaderboardStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'draft'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "leaderboardPlatform", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "platform", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minigameId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rules", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "followersOnly", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'22:00'", + "generated": null, + "identity": null, + "name": "resetTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "cooldownSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referralWelcomeFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rewardSettings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rewardsTriggeredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rewardRecipients", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Leaderboard", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leaderboardId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "leaderboardAuditAction", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "delta", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leaderboardId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "score", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isBanned", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referrerContactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "scoredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dailyBucket", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dailyCounts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "breakdown", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastActivityAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leaderboardId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delta", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "leaderboardScoreSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rule", + "entityType": "columns" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceRef", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLink", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLink", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLink", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLink", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLink", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLink", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linkId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isFavourite", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastAccessedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentAttributes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "messageType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "contentType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "senderType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "messageKind", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'message'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attributes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Message", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sinceTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "MessageCleanupStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageCleanup", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "messagingAdChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "messagingAdCreateState", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "createState", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "messagingAdPublishState", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'draft'", + "generated": null, + "identity": null, + "name": "publishState", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaCampaignId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaAdSetId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaAdCreativeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaAdId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "input", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cleanupError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "messagingAdChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'POSITIONAL'", + "generated": null, + "identity": null, + "name": "parameterFormat", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "components", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'current'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentCategory", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'business_messaging'", + "generated": null, + "identity": null, + "name": "actionSource", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "capiStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiSentAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMetaCatalogId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "metaCatalogItemDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'push'", + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retailerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedFingerprint", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMetaCatalogId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "metaCatalogSyncStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'queued'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "metaCatalogItemDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'push'", + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "metaCatalogSyncScope", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'all'", + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "selectedProductIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "handles", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionLeaseId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "succeededCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "itemErrors", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "skippedItems", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "pollAttempt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "definition", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowJson", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniApp", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "submissionsCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "miniAppId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "whatsappFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "validationErrors", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publishedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "miniAppId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "miniAppSubmissionSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "answers", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "miniAppId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inputName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "type": "miniAppUploadStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "minigameType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "generalSettings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appearance", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "playerSettings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prizeSettings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "winningMessageSettings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nonWinningMessageSettings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "playsCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "participantsCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "winnersCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Minigame", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sharesCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minigameId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "played", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "remaining", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sharesCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referrerContactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigameContact", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minigameId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isWinning", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prizeId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MinigamePlay", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prizeName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicConfig", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "livemode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "usePlatformCredential", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isVerified", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verifiedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "PlatformCredential", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUsedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortDescription", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "longDescription", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "price", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "taxes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "discount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'USD'", + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sku", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "inventoryPolicy", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'dont_track'", + "generated": null, + "identity": null, + "name": "inventoryPolicy", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "inventoryQuantity", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowOutOfStockPurchase", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "images", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "tags", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subcategoryId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isSearchable", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowSpecialRequest", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isAddonOnly", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Product", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "maxSelections", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductAddon", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "addonProductIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductCategory", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "combination", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "price", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariant", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "values", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionIdSnapshot", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionTitleSnapshot", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionTypeSnapshot", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "labelSnapshot", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pointsEarned", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "attemptCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "answeredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enableScore", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enableRetryMessages", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enableCustomFieldMapping", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerFlowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Questionnaire", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionnaireId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "questionnaireQuestionType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "orderNo", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "point", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retryMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "systemFieldKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "config", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionnaireId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "questionnaireSubmissionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'inProgress'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "totalPoints", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentQuestionId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentQuestionSentAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastAnsweredMessageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "RefLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "RefLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linkId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "RefLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "RefLinkStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "RefLinkStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "RefLinkStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "ReflinkType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'refLink'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "qrStyles", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "widgetAuthorizedDomains", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "widgetHiddenInboxIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetLogoFileId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetBrandName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetBrandUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Reflink", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetLogoBackgroundColor", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstResponseTargetSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextResponseTargetSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "25", + "generated": null, + "identity": null, + "name": "breachingThresholdPercent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReply", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReply", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReply", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReply", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortcut", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReply", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReply", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "savedReplyId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mediaLibraryFileId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "subscribers", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "messages", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Sequence", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "runAtMs", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "bucket", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idempotencyKey", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockOwner", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "enrollmentId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "case when \"seenAt\" is null then false when \"deliveredAt\" is null then false else \"seenAt\" >= \"deliveredAt\" end", + "type": "stored" + }, + "identity": null, + "name": "isRead", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "order", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delayDays", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "delayMinutes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delayUnit", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "specificDateTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "anytime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendTimeStart", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendTimeEnd", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "'[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\",\"sunday\"]'", + "generated": null, + "identity": null, + "name": "sendDays", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SequenceStep", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Spreadsheet", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "spreadsheetId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SystemField", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SystemField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SystemField", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SystemField", + "type": "SystemFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "SystemField", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Tag", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelType", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TagChannel", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalLabelId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chatId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "telegramChatType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TelegramChat", + "type": "telegramBotChatStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botStatus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publisherName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "youtubeVideoId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "testLink", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "selection", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryCounts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formatVersion", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shareToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "shareEnabled", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shareExpiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultPermissions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "createInstallFolder", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "defaultAutoUpdate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "installCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Template", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateName", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceWorkspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formatVersion", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "templateInstallationStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "warnings", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "warningCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "resourceCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installFolderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoUpdate", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceUpdatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installedBy", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "templateResourceCategory", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resourceKind", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceResourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "wasExisting", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "actions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Trigger", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webhookId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "operator", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Condition", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstEnteredAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "executedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalContacts", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failureCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "TriggerStat", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalExecutions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "devicePlatform", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "platform", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastSeenAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "menus", + "entityType": "columns" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Webhook", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "executedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webhookId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WebhookExecution", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credential", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "grantedScopes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scopeCheckedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provisionedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "creditLineId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wacid", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attemptId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "whatsappCallDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "whatsappCallStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'ringing'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "whatsappCallOutcome", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outcome", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "durationSeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "answeredByUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "initiatedByUserId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordingRequested", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordingFailureReason", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordingPath", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transcript", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transcribedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transcriptSegments", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiSummary", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiSummarizedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiSummaryProvider", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCall", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "whatsappCallPermissionResponse", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "response", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isPermanent", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "respondedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumberId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payloadHash", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parseFailedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "categories", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "validationErrors", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "completedCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "screens", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "components", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAccessToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "apiVersion", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "candidatePhoneNumberIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "claimedPhoneNumberIds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "consumedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHours", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHours", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHours", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHours", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHours", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ranges", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "weekday", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startMinute", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endMinute", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultReply", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "defaultReplyFrequency", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'allTime'", + "generated": null, + "identity": null, + "name": "defaultReplyFrequency", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "targetCountry", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'en'", + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'UTC'", + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'#016DFF'", + "generated": null, + "identity": null, + "name": "brandColor", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "developmentMode", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "smartResponseDelaySeconds", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logo", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scheduledDeletionAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purgeStartedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "supportAccessUntil", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "capiLimitedDataUse", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "Workspace", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "WorkspaceApiTokenPermission", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permission", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenHash", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenPrefix", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isDefault", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedToken", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "scopes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macCount", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "workspaceMemberRole", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notificationChannels", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notificationTypes", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "onlineSince", + "entityType": "columns" + }, + { + "schema": "public", + "table": "MessageShard", + "nameExplicit": true, + "columns": [ + { + "value": "isActive", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageShard_isActive_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessageShard", + "nameExplicit": true, + "columns": [ + { + "value": "shardKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageShard_shardKey_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "nameExplicit": true, + "columns": [ + { + "value": "startTime", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "endTime", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ShardTimeRange_time_lookup_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "nameExplicit": true, + "columns": [ + { + "value": "shardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ShardTimeRange_shardId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspace_integration_source_sourceEventId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"channel\" = 'whatsapp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_ws_whatsapp_source_sourceEventId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"channel\" = 'messenger'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_ws_messenger_source_sourceEventId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationInstagramId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"channel\" = 'instagram'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_ws_instagram_source_sourceEventId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_adId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "enabled", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionRule_workspaceId_channel_enabled_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": true, + "columns": [ + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_sourceId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": true, + "columns": [ + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "chunkIndex", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_sourceId_chunkIndex_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": true, + "columns": [ + { + "value": "embedding", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "vector_cosine_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "hnsw", + "concurrently": false, + "name": "AIConversationEmbedding_embedding_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationSource", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_lookup_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationSource", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_workspaceId_sourceType_sourceKey_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationSource", + "nameExplicit": true, + "columns": [ + { + "value": "messageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_messageId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIConversationSource", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIEmbedding", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIEmbedding_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "status IN ('pending', 'running', 'cancelling')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_inbox_live_uq", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "revision", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_inbox_revision_uq", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_workspace_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "\"createdAt\" DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_inbox_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastHeartbeatAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('pending', 'running', 'cancelling')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_live_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": true, + "columns": [ + { + "value": "requestedByUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_requestedByUserId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": true, + "columns": [ + { + "value": "applyToAllRequestedByUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_applyToAllRequestedByUserId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": true, + "columns": [ + { + "value": "gotoFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_gotoFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsAgentResponseEvent_workspaceId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "aiProvider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_aiProvider_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "hasResponse", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "result", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_hasResponse_result_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBroadcastEvent_workspaceId_broadcastId_eventType_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adminId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_adminId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsConversationEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "toAssignee", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsConversationEvent_workspaceId_toAssignee_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsFlowNodeEvent_workspaceId_flowId_analyticsId_nodeId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "buttonId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsFlowNodeEvent_workspaceId_flowId_analyticsId_nodeId_buttonId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adminId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_adminId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "senderType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_senderType_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsSequenceEvent_workspaceId_sequenceId_stepId_eventType_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_token_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": true, + "columns": [ + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_topicId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_workspaceId_topicId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AnalyticsManifestStatus", + "nameExplicit": true, + "columns": [ + { + "value": "objectKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsManifestStatus_objectKey_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "startAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_workspaceId_startAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "startAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_calendarId_status_startAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_contactId_calendarId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": true, + "columns": [ + { + "value": "publicLinkSlug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_publicLinkSlug_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendarAvailability_calendarId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "timingValue", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "timingUnit", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendarReminder_dedupe_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "jobId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_jobId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sendAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_status_sendAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "appointmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_appointmentId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Attachment", + "nameExplicit": true, + "columns": [ + { + "value": "messageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "messageCreatedAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_message_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Attachment", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_workspaceId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Attachment", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Account", + "nameExplicit": true, + "columns": [ + { + "value": "providerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "accountId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Account_providerId_accountId_tenantId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Invitation", + "nameExplicit": true, + "columns": [ + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Invitation_code_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Session", + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Session_token_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "User", + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "User_email_tenant_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "User", + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "User_tenantId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomatedResponse_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "nameExplicit": true, + "columns": [ + { + "value": "lastTriggeredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomationThrottle_lastTriggeredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomationThrottle_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BotField", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BotField_workspaceId_type_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" IN ('scheduled', 'sending') AND \"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_workspaceId_active_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_flowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_channel_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "schedulesAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_schedulesAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"deletedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_deletedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": true, + "columns": [ + { + "value": "parentBroadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurrenceAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_parentBroadcastId_occurrenceAt_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "nameExplicit": true, + "columns": [ + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrence_broadcastId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrence_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "nameExplicit": true, + "columns": [ + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"nextRunAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrence_due_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": true, + "columns": [ + { + "value": "recurrenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "localSlot", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurrenceAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_recurrenceId_localSlot_occurrenceAt_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": true, + "columns": [ + { + "value": "recurrenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurrenceAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_recurrenceId_occurrenceAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": true, + "columns": [ + { + "value": "childBroadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_childBroadcastId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastTarget_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastTarget_flowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ChannelPost", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "externalPostId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ChannelPost_workspaceId_channel_externalPostId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ChannelPost", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "COALESCE(\"publishedAt\", \"createdAt\") DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ChannelPost_workspaceId_sortAt_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ChannelPost", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ChannelPost_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_workspace_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastHeartbeatAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('init', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_active_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "\"startedAt\" DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('succeeded', 'partial')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_resume_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "status = 'init' AND type = 'coexist'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_init_uq", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "type = 'contact_scan' AND status IN ('init', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_contact_scan_active_uq", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "type = 'contact_scan'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_contact_scan_due_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomation_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomation_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomation_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "commentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "replyChannel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_dedup_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_automation_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"replyChannel\" = 'private' AND \"deliveredAt\" IS NOT NULL AND \"seenAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_private_unseen_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'failed'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_failed_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "commentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_dedup_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_automation_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "postId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationReply_dedup_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationReply_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": true, + "columns": [ + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_expiresAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": true, + "columns": [ + { + "value": "consumedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"consumedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_consumedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": true, + "columns": [ + { + "value": "stateNonceHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_stateNonceHash_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "provider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_workspaceId_provider_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": true, + "columns": [ + { + "value": "provider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_provider_sourceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "broadcastSubscribedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_broadcast_subscribed_at", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_created_at", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_email", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "phoneNumber", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_phone_number", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "md5(btrim(regexp_replace(\"fullName\", '[ \\t\\n\\v\\f\\r]+', ' ', 'g')))", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_full_name_md5", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "firstName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_firstName_trgm_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "lastName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_lastName_trgm_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_email_trgm_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumber", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_phoneNumber_trgm_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactCustomField", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactCustomField_contactId_customFieldId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactCustomField", + "nameExplicit": true, + "columns": [ + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactCustomField_customFieldId_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceUserId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceUserId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceParentUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceParentUserId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceParentUserId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "profileSnapshotNextAttemptAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"profileSnapshotState\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_profileSnapshot_pending_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"threadControlState\" = 'standby' AND \"threadOwnerRole\" = 'ai_agent'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_id_ai_held_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastIncomingMessageAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_contactId_lastIncomingMessageAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastOutboundMessageAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_contactId_lastOutboundMessageAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "(\"referral\"->>'ctwaClid')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referral\"->>'ctwaClid' IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_referral_ctwaClid_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": true, + "columns": [ + { + "value": "(\"referral\"->>'adId')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referral\"->>'adId' IS NOT NULL AND \"referral\"->>'source' = 'ADS'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_referral_adId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactInboxPost", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "postId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInboxPost_workspaceId_postId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactNote", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactNote_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_on_broadcast_contact_id", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnBroadcast_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": true, + "columns": [ + { + "value": "isRead", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_on_broadcast_is_read", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": true, + "columns": [ + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"sent\" = false AND \"failedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnBroadcast_unsent_order_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_sequenceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_status_nextRunAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_workspaceId_status_nextRunAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_contactId_sequenceId_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_workspaceId_flowId_contactInboxId_stepId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "triggerAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_status_triggerAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": true, + "columns": [ + { + "value": "appointmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_appointmentId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" NOT IN ('completed', 'failed', 'canceled') AND \"type\" = 'followUp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_followUp_active_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" NOT IN ('completed', 'failed', 'canceled') AND \"type\" = 'quickReplyFollowUp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_quickReplyFollowUp_active_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTagChannel_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTagChannel_tagId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_dm_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "responseDueAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"responseDueAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_workspaceId_responseDueAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": true, + "columns": [ + { + "value": "aiContextLastMessageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_aiContextLastMessageId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastActivityAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_workspaceId_lastActivityAt_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_conversationId_userId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_code_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"issuedContactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_issuedContactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "issuedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_issuedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "usedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_usedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_code_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "usedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_usedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CouponTopic", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_status_deletedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CouponTopic", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_expiresAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CouponTopic", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_name_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CustomField", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomField_workspaceId_type_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DecisionConnection", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionConnection_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DecisionConnection", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionConnection_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DecisionProfile", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DecisionProfile", + "nameExplicit": true, + "columns": [ + { + "value": "connectionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_connectionId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DecisionProfile", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DecisionProfile", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"globalRouterEnabled\" = true", + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_workspaceId_globalRouter_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "DynamicImage", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DynamicImage_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "EmailTopic", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EmailTopic_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "EmailTopic", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EmailTopic_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AuditLog", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AuditLog_workspaceId_createdAt_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "AuditLog", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"userId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AuditLog_workspaceId_userId_createdAt_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CustomDomain", + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_tenantId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CustomDomain", + "nameExplicit": true, + "columns": [ + { + "value": "domain", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_domain_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "CustomDomain", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "License", + "nameExplicit": true, + "columns": [ + { + "value": "licenseId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "License_licenseId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformAdmin_userId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Tenant", + "nameExplicit": true, + "columns": [ + { + "value": "ownerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tenant_ownerId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "position", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TenantHelpItem_tenantId_position_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "UserQuota", + "nameExplicit": true, + "columns": [ + { + "value": "channelsTornDownAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserQuota_channelsTornDownAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "UserQuota", + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"channelsTornDownAt\" IS NULL AND \"planStatus\" = 'trial'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserQuota_due_expired_trial_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ErrorLog", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ErrorLog_workspaceId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ErrorLog", + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ErrorLog_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ErrorLog", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ErrorLog_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "event", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ExternalWebhook_workspaceId_event_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "event", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "url", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ExternalWebhook_workspaceId_event_url_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "pageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "formId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsAutomation_workspaceId_pageId_formId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "leadgenId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_automationId_leadgenId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "nameExplicit": true, + "columns": [ + { + "value": "leadgenId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_leadgenId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookMarketingMessage_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "nameExplicit": true, + "columns": [ + { + "value": "campaignId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookMarketingMessage_campaignId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookMarketingMessagesAuth_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "File", + "nameExplicit": true, + "columns": [ + { + "value": "path", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_path_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "File", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contextType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_workspaceId_contextType_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "File", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "subType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_workspaceId_subType_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowAnalyticsSession_workspaceId_flowId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowAnalyticsSession_flowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "buttonId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowNodeStat_filter_1_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"eventType\" = 'seen' AND \"seenAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowNodeStat_filter_2_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "FlowRun", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowRun_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Folder", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Folder_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Folder", + "nameExplicit": true, + "columns": [ + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Folder_parentId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "transactionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_workspaceId_transactionId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_workspaceId_occurredAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_workspaceId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextProcessingCheckAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_status_nextProcessingCheckAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "claimedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_status_claimedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsSettings_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_workspaceId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_workspaceId_type_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_inboxId_type_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": true, + "columns": [ + { + "value": "fileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_fileId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"type\" = 'products' AND \"status\" IN ('pending', 'processing')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_products_active_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhook", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhook_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhook", + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhook_token_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "inboundWebhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "idempotencyKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"idempotencyKey\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_inboundWebhookId_idempotencyKey_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "inboundWebhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_inboundWebhookId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'received'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_createdAt_received_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "claimedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'processing'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_claimedAt_processing_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Inbox", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Inbox_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Inbox", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Inbox_workspaceId_channel_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationActiveCampaign_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationActiveCampaign_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationApi", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationApi_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationApi", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationApi_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationApi", + "nameExplicit": true, + "columns": [ + { + "value": "tokenHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationApi_tokenHash_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Integration", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Integration_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Integration", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Integration_workspaceId_integrationType_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationClaude_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationClaude_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDeepseek_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDeepseek_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDrip_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDrip_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationFacebookAds_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationFacebookAds_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGemini_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGemini_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGetResponse_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGetResponse_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleAds_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleAds_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleCalendar_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleSheet_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_welcomeFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + { + "value": "igId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_igId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationKlaviyo_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationKlaviyo_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailchimp_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailchimp_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailerLite_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailerLite_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_welcomeFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": true, + "columns": [ + { + "value": "handoverResumeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_handoverResumeFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": true, + "columns": [ + { + "value": "pageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_pageId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "nameExplicit": true, + "columns": [ + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_deletedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMoosend_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMoosend_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenAI_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenAI_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "preset", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"preset\" <> 'custom'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_workspaceId_preset_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenrouter_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenrouter_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOutlookCalendar_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSendGrid_integrationId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSendGrid_workspaceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSmtp_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSmtp_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "nameExplicit": true, + "columns": [ + { + "value": "botId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_botId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationThreads_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationThreads_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "nameExplicit": true, + "columns": [ + { + "value": "threadsUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationThreads_threadsUserId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "nameExplicit": true, + "columns": [ + { + "value": "openId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_openId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_welcomeFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": true, + "columns": [ + { + "value": "handoverResumeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_handoverResumeFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_phoneNumberId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": true, + "columns": [ + { + "value": "fallbackFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_fallbackFlowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": true, + "columns": [ + { + "value": "oaId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_oaId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_inboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Leaderboard_workspaceId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Leaderboard_inboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Leaderboard_minigameId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardAuditLog_leaderboardId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "score", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "scoredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "NOT \"isBanned\"", + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_ranking_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "referrerContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_leaderboardId_referrerContactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardScoreEvent_leaderboardId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardScoreEvent_leaderboardId_contactId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardScoreEvent_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MagicLink", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLink_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MagicLink", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLink_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "linkId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLinkStat_workspaceId_linkId_occurredAt_contactInboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MediaLibraryFile_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MediaLibraryFile_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MediaLibraryFolder_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Message", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_conversation_history_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Message", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_workspace_created_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Message", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_contactInboxId_sourceId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Message", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_conversationId_type_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Message", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"parentId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_parentId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessageCleanup", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_inboxId_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessageCleanup", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_status_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessageCleanup", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_integrationWhatsappId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_integrationMessengerId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": true, + "columns": [ + { + "value": "integrationInstagramId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_integrationInstagramId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_integrationWhatsappId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_integrationMessengerId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": true, + "columns": [ + { + "value": "integrationInstagramId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_integrationInstagramId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerMessageTemplate_integrationMessengerId_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerWelcomeMessageFlow_workspaceId_flowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerWelcomeMessageFlow_integrationMessengerId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" = 'current'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerWelcomeMessageFlow_current_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_workspaceId_channel_sourceKey_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "nameExplicit": true, + "columns": [ + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_channel_integrationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "nameExplicit": true, + "columns": [ + { + "value": "integrationMetaCatalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "catalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "retailerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_integration_retailer_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "nameExplicit": true, + "columns": [ + { + "value": "integrationMetaCatalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "catalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_integration_product_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_productId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" IN ('queued', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogSyncRun_active_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniApp", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniApp_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniApp", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniApp_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "nameExplicit": true, + "columns": [ + { + "value": "miniAppId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppPublication_miniAppId_integrationWhatsappId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "nameExplicit": true, + "columns": [ + { + "value": "miniAppId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppSubmission_miniAppId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppSubmission_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": true, + "columns": [ + { + "value": "uploadToken", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_uploadToken_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": true, + "columns": [ + { + "value": "path", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_path_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": true, + "columns": [ + { + "value": "miniAppId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "inputName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_miniAppId_inputName_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": true, + "columns": [ + { + "value": "submissionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_submissionId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Minigame", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Minigame_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Minigame", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Minigame_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_minigameId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_minigameId_contactId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MinigamePlay", + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigamePlay_minigameId_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "MinigamePlay", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigamePlay_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "PlatformCredential", + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "livemode", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"userId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_user_type_livemode_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "PlatformCredential", + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "livemode", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"userId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_platform_type_livemode_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "PlatformCredential", + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_userId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Product", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Product", + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_categoryId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Product", + "nameExplicit": true, + "columns": [ + { + "value": "subcategoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_subcategoryId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ProductAddon", + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductAddon_productId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ProductCategory", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductCategory_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ProductCategory", + "nameExplicit": true, + "columns": [ + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductCategory_parentId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ProductVariant", + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductVariant_productId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductVariantOption_productId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "nameExplicit": true, + "columns": [ + { + "value": "submissionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "questionIdSnapshot", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireAnswer_submissionId_questionIdSnapshot_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "nameExplicit": true, + "columns": [ + { + "value": "questionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireAnswer_questionId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Questionnaire", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Questionnaire_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Questionnaire", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Questionnaire_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "orderNo", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireQuestion_questionnaireId_orderNo_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "nameExplicit": true, + "columns": [ + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireQuestion_customFieldId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_questionnaireId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_questionnaireId_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" = 'inProgress'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_workspaceId_contactId_active_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "RefLinkStat", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "RefLinkStat_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "RefLinkStat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "linkId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "RefLinkStat_workspaceId_linkId_occurredAt_contactInboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Reflink", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Reflink_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "nameExplicit": true, + "columns": [ + { + "value": "savedReplyId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_savedReplyId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "nameExplicit": true, + "columns": [ + { + "value": "mediaLibraryFileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_mediaLibraryFileId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "nameExplicit": true, + "columns": [ + { + "value": "savedReplyId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "mediaLibraryFileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_savedReplyId_mediaLibraryFileId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Sequence", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Sequence_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Sequence", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Sequence_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "idempotencyKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_idempotencyKey_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_pending_runAtMs_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "bucket", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_pending_bucket_runAtMs_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_status_runAtMs_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_workspaceId_status_runAtMs_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "enrollmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_enrollmentId_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_workspace_sequence_step_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "bucket", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_bucket_status_runAtMs_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "updatedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" in ('completed', 'failed', 'canceled')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_terminal_updatedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceStep", + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceStep_sequenceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "SequenceStep", + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceStep_flowId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Spreadsheet", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Spreadsheet", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "spreadsheetId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_workspaceId_spreadsheetId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Spreadsheet", + "nameExplicit": true, + "columns": [ + { + "value": "spreadsheetId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_spreadsheetId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Tag", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tag_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Tag", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tag_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TagChannel", + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_tag_integration_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TagChannel", + "nameExplicit": true, + "columns": [ + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "externalLabelId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_external_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TagChannel", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_workspace_channel_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TagChannel", + "nameExplicit": true, + "columns": [ + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_integration_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TelegramChat", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "chatId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TelegramChat_inboxId_chatId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TelegramChat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TelegramChat_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Template", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Template", + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_tenantId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Template", + "nameExplicit": true, + "columns": [ + { + "value": "shareToken", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_shareToken_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": true, + "columns": [ + { + "value": "templateId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_templateId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_workspaceId_status_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "nameExplicit": true, + "columns": [ + { + "value": "installationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstalledResource_installationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "resourceKind", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "resourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstalledResource_workspaceId_resourceKind_resourceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Trigger", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_name_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Trigger", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Trigger", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Trigger", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "active", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_active_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_source_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_triggerId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": true, + "columns": [ + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_webhookId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_sourceId_triggerId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_sourceId_webhookId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_triggerId_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerExecution", + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_triggerId_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerExecution", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerExecution", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerStat", + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_triggerId_date_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerStat", + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_triggerId_date_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "TriggerStat", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_workspaceId_date_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserDeviceToken_userId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserPersistentMenu_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Webhook", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Webhook", + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_folderId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Webhook", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "active", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_workspaceId_active_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WebhookExecution", + "nameExplicit": true, + "columns": [ + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_webhookId_contactId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WebhookExecution", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WebhookExecution", + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_contactId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "wabaId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappBusinessAccount_workspaceId_wabaId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "wacid", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"wacid\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_wacid_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "attemptId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"attemptId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_attemptId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_conversationId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_contactInboxId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_workspaceId_createdAt_id_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_contactInboxId_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'ringing'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_ringing_createdAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'ringing' AND \"wacid\" IS NOT NULL AND \"answeredByUserId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_resumableRinging_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "recordedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"recordingPath\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_recording_inboxId_recordedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"direction\" = 'businessInitiated' AND \"status\" IN ('ringing', 'accepted')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_pendingOutbound_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCallPermission_contactInboxId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCallPermission_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_phoneNumberId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "payloadHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_phone_hash_uq", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "nameExplicit": true, + "columns": [ + { + "value": "processedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"processedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_processedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "nameExplicit": true, + "columns": [ + { + "value": "parseFailedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"parseFailedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_parseFailedAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappFlow_integrationWhatsappId_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappMessageTemplate_integrationWhatsappId_sourceId_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappSignupSession_userId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "nameExplicit": true, + "columns": [ + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappSignupSession_expiresAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkingHours", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHours_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"workingHoursId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursDateOverride_workspace_date_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "nameExplicit": true, + "columns": [ + { + "value": "workingHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"workingHoursId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursDateOverride_schedule_date_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursDateOverride_workspaceId_date_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "nameExplicit": true, + "columns": [ + { + "value": "workingHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursInterval_workingHoursId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "nameExplicit": true, + "columns": [ + { + "value": "workingHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursMember_workingHoursId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Workspace", + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_tenantId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Workspace", + "nameExplicit": true, + "columns": [ + { + "value": "scheduledDeletionAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_scheduledDeletionAt_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "Workspace", + "nameExplicit": true, + "columns": [ + { + "value": "supportAccessUntil", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_supportAccessUntil_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceApiToken_workspaceId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"isDefault\"", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceApiToken_workspaceId_default_key", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceMember_workspaceId_userId_idx", + "entityType": "indexes" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "nameExplicit": false, + "columns": [ + "shardId" + ], + "schemaTo": "public", + "tableTo": "MessageShard", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ShardTimeRange_shardId_MessageShard_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_IENNsXLBb1k1_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_yeTDEtvJMs4H_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_1X1qUqZpm24x_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AdsConversionEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_k99JXbMObQIn_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "nameExplicit": false, + "columns": [ + "integrationFacebookAdsId" + ], + "schemaTo": "public", + "tableTo": "IntegrationFacebookAds", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_fBmu8W26Mw5R_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_3zzAptVRRuZD_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_HUibBtSUZbML_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIAgent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIAgent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": false, + "columns": [ + "sourceId" + ], + "schemaTo": "public", + "tableTo": "AIConversationSource", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_sourceId_AIConversationSource_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIConversationSource", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationSource_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIConversationSource", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationSource_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIEmbedding", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIEmbedding_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIEmbedding", + "nameExplicit": false, + "columns": [ + "aiFileId" + ], + "schemaTo": "public", + "tableTo": "AIFile", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIEmbedding_aiFileId_AIFile_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIFile", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIFile_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIFunction", + "nameExplicit": false, + "columns": [ + "triggerFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIFunction_triggerFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIFunction", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIFunction_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverBulkRun_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverBulkRun_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "nameExplicit": false, + "columns": [ + "requestedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIHandoverBulkRun_requestedByUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverSettings_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverSettings_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": false, + "columns": [ + "gotoFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIHandoverSettings_gotoFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "nameExplicit": false, + "columns": [ + "applyToAllRequestedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIHandoverSettings_applyToAllRequestedByUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AIMCPServer", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIMCPServer_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsAgentResponseEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsBotMessageEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsBroadcastEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsContactEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsConversationEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsFlowNodeEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsMessageEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsSequenceEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AnalyticsEmailTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Appointment_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": false, + "columns": [ + "calendarId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Appointment_calendarId_AppointmentCalendar_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Appointment_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Appointment_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Appointment", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Appointment_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": false, + "columns": [ + "confirmationFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_confirmationFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": false, + "columns": [ + "cancellationFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_cancellationFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "nameExplicit": false, + "columns": [ + "externalConnectionId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_externalConnectionId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "nameExplicit": false, + "columns": [ + "calendarId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarAvailability_QfahoIQAX592_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "nameExplicit": false, + "columns": [ + "calendarId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarReminder_5O4INfYC3dY3_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarReminder_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": false, + "columns": [ + "appointmentId" + ], + "schemaTo": "public", + "tableTo": "Appointment", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_appointmentId_Appointment_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": false, + "columns": [ + "reminderConfigId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendarReminder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_a526jJM55OD7_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentReminderDispatch_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Account", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Account_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Account", + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Account_tenantId_Tenant_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Invitation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Invitation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Invitation", + "nameExplicit": false, + "columns": [ + "invitedBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Invitation_invitedBy_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Session", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Session_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "User", + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "User_tenantId_Tenant_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomatedResponse_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AutomatedResponse_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AutomatedResponse_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomationThrottle_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomationThrottle_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BotField", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BotField_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BotField", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BotField_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Broadcast_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Broadcast_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_integrationWhatsappId_IntegrationWhatsapp_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_integrationMessengerId_IntegrationMessenger_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Broadcast", + "nameExplicit": false, + "columns": [ + "parentBroadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_parentBroadcastId_Broadcast_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrence_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "nameExplicit": false, + "columns": [ + "broadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrence_broadcastId_Broadcast_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrenceOccurrence_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": false, + "columns": [ + "recurrenceId" + ], + "schemaTo": "public", + "tableTo": "BroadcastRecurrence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrenceOccurrence_x0yNXfzZ2cZs_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "nameExplicit": false, + "columns": [ + "childBroadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BroadcastRecurrenceOccurrence_Md67cxyTrOQZ_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "nameExplicit": false, + "columns": [ + "broadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastTarget_broadcastId_Broadcast_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastTarget_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BroadcastTarget_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ChannelPost", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ChannelPost_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ChannelPost", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ChannelPost_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "nameExplicit": false, + "columns": [ + "requestedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CoexistSyncRun_requestedByUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomation", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomation_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomation", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomation_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "CommentAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationEvent_automationId_CommentAutomation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationEvent_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationMiss_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "CommentAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationMiss_automationId_CommentAutomation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationMiss_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationMiss_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "CommentAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "CommentAutomationReply_automationId_CommentAutomation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "CommentAutomationReply_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "CommentAutomationReply_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConnectSession_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": false, + "columns": [ + "targetConnectionId" + ], + "schemaTo": "public", + "tableTo": "Connection", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConnectSession_targetConnectionId_Connection_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": false, + "columns": [ + "actorUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ConnectSession_actorUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConnectSession", + "nameExplicit": false, + "columns": [ + "actorTokenId" + ], + "schemaTo": "public", + "tableTo": "WorkspaceApiToken", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ConnectSession_actorTokenId_WorkspaceApiToken_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Connection_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Connection_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Connection_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Connection", + "nameExplicit": false, + "columns": [ + "createdBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Connection_createdBy_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Contact", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Contact_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactCustomField", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactCustomField_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactCustomField", + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactCustomField_customFieldId_CustomField_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactInbox_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactInbox", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactInbox_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactNote", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactNote_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactNote", + "nameExplicit": false, + "columns": [ + "createdById" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactNote_createdById_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": false, + "columns": [ + "broadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_broadcastId_Broadcast_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": false, + "columns": [ + "sequenceId" + ], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_sequenceId_Sequence_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSmartDelay_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": false, + "columns": [ + "appointmentId" + ], + "schemaTo": "public", + "tableTo": "Appointment", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ContactOnSmartDelay_appointmentId_Appointment_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSmartDelay_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactToTag", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTag_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactToTag", + "nameExplicit": false, + "columns": [ + "tagId" + ], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTag_tagId_Tag_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "nameExplicit": false, + "columns": [ + "tagId" + ], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_tagId_Tag_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "nameExplicit": false, + "columns": [ + "tagChannelId" + ], + "schemaTo": "public", + "tableTo": "TagChannel", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_tagChannelId_TagChannel_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": false, + "columns": [ + "assignedUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Conversation_assignedUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": false, + "columns": [ + "assignedInboxTeamId" + ], + "schemaTo": "public", + "tableTo": "InboxTeam", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Conversation_assignedInboxTeamId_InboxTeam_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Conversation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Conversation", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Conversation_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Coupon_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": false, + "columns": [ + "topicId" + ], + "schemaTo": "public", + "tableTo": "CouponTopic", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Coupon_topicId_CouponTopic_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Coupon", + "nameExplicit": false, + "columns": [ + "issuedContactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Coupon_issuedContactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CouponTopic", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CouponTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CouponTopic", + "nameExplicit": false, + "columns": [ + "createdById" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CouponTopic_createdById_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CustomField", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CustomField_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CustomField", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CustomField_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "DecisionConnection", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DecisionConnection_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "DecisionProfile", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DecisionProfile_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "DecisionProfile", + "nameExplicit": false, + "columns": [ + "connectionId" + ], + "schemaTo": "public", + "tableTo": "DecisionConnection", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "DecisionProfile_connectionId_DecisionConnection_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "DynamicImage", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DynamicImage_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "DynamicImage", + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "DynamicImage_customFieldId_CustomField_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "EmailTopic", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EmailTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "EmailTopic", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EmailTopic_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AuditLog", + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AuditLog_workspaceId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AuditLog", + "nameExplicit": true, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AuditLog_userId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "CustomDomain", + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CustomDomain_tenantId_Tenant_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "PlatformAdmin_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Tenant", + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Tenant_ownerId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TenantHelpItem_tenantId_Tenant_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "UserQuota", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "UserQuota_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "WorkspaceUsage_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ErrorLog", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ErrorLog_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ErrorLog", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ErrorLog_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ExternalWebhook_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookLeadAdsAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "FacebookLeadAdsAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookLeadAdsLead_n8swD949nr3L_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "FacebookLeadAdsLead_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookMarketingMessage_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookMarketingMessagesAuth_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "File", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "File_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "File", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "File_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Flow", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Flow_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Flow", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Flow_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowNodeStat_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowRun", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowRun", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowRun", + "nameExplicit": false, + "columns": [ + "flowVersionId" + ], + "schemaTo": "public", + "tableTo": "FlowVersion", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_flowVersionId_FlowVersion_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowRun", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowVersion", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowVersion_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "FlowVersion", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowVersion_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Folder", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Folder_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "GoogleAdsConversionEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": false, + "columns": [ + "integrationGoogleAdsId" + ], + "schemaTo": "public", + "tableTo": "IntegrationGoogleAds", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "GoogleAdsConversionEvent_Ju5oh0fVmaLy_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "GoogleAdsConversionEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "GoogleAdsSettings_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IgStoryAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IgStoryAutomation_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IgStoryAutomation_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Import_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Import_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Import_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Import", + "nameExplicit": false, + "columns": [ + "fileId" + ], + "schemaTo": "public", + "tableTo": "File", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Import_fileId_File_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboundWebhook", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboundWebhook_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboundWebhookRequest_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": false, + "columns": [ + "inboundWebhookId" + ], + "schemaTo": "public", + "tableTo": "InboundWebhook", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboundWebhookRequest_inboundWebhookId_InboundWebhook_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "InboundWebhookRequest_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "InboundWebhookRequest_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Inbox", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Inbox_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboxContactStat", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxContactStat_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboxTeam", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeam_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "nameExplicit": false, + "columns": [ + "inboxTeamId" + ], + "schemaTo": "public", + "tableTo": "InboxTeam", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeamMember_inboxTeamId_InboxTeam_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeamMember_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationActiveCampaign_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationActiveCampaign_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationApi", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationApi_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationApi", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationApi_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Integration", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Integration_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationClaude_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationClaude_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDeepseek_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDeepseek_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDrip_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDrip_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationFacebookAds_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationFacebookAds_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGemini_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGemini_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGetResponse_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGetResponse_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleAds_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleAds_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleCalendar_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleSheet_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleSheet_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationInstagram_workspaceId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationInstagram_inboxId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "nameExplicit": true, + "columns": [ + "welcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationInstagram_welcomeFlowId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationKlaviyo_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationKlaviyo_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailchimp_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailchimp_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailerLite_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailerLite_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMessenger_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMessenger_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": false, + "columns": [ + "welcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationMessenger_welcomeFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "nameExplicit": false, + "columns": [ + "handoverResumeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationMessenger_handoverResumeFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMetaCatalog_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMetaCatalog_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMoosend_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMoosend_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenai_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenai_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "nameExplicit": false, + "columns": [ + "aiAgentId" + ], + "schemaTo": "public", + "tableTo": "AIAgent", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationOpenai_aiAgentId_AIAgent_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenaiCompatible_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenaiCompatible_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenrouter_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenrouter_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOutlookCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOutlookCalendar_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSendGrid_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSendGrid_integrationId_Integration_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSmtp_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSmtp_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTelegram_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTelegram_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationThreads_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationThreads_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTiktok_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTiktok_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWebchat_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWebchat_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "nameExplicit": false, + "columns": [ + "welcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationWebchat_welcomeFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": false, + "columns": [ + "handoverResumeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationWhatsapp_handoverResumeFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWhatsapp_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWhatsapp_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationZalo_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationZalo_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "nameExplicit": false, + "columns": [ + "fallbackFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationZalo_fallbackFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Leaderboard_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Leaderboard_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": false, + "columns": [ + "minigameId" + ], + "schemaTo": "public", + "tableTo": "Minigame", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Leaderboard_minigameId_Minigame_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Leaderboard", + "nameExplicit": false, + "columns": [ + "referralWelcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Leaderboard_referralWelcomeFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "nameExplicit": false, + "columns": [ + "leaderboardId" + ], + "schemaTo": "public", + "tableTo": "Leaderboard", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardAuditLog_leaderboardId_Leaderboard_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardAuditLog_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "LeaderboardAuditLog_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "nameExplicit": false, + "columns": [ + "actorUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "LeaderboardAuditLog_actorUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": false, + "columns": [ + "leaderboardId" + ], + "schemaTo": "public", + "tableTo": "Leaderboard", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardParticipant_leaderboardId_Leaderboard_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardParticipant_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardParticipant_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "nameExplicit": false, + "columns": [ + "referrerContactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "LeaderboardParticipant_referrerContactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MagicLink", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLink_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLinkStat_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MagicLinkStat", + "nameExplicit": false, + "columns": [ + "linkId" + ], + "schemaTo": "public", + "tableTo": "MagicLink", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLinkStat_linkId_MagicLink_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MediaLibraryFile_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "MediaLibraryFolder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MediaLibraryFile_folderId_MediaLibraryFolder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MediaLibraryFolder_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_D2X0VlACjh0B_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_DlCmuyYqclNt_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_LwL2ykeZegup_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "nameExplicit": false, + "columns": [ + "createdBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MessagingAdOperation_createdBy_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_Q2FrBLiP3QqD_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_tLZC78O5pMBb_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_4ubezEjd9jQX_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerMessageTemplate_x0Vv1d8cvLYN_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerWelcomeMessageFlow_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerWelcomeMessageFlow_OSpsF41G77zr_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCapiEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCapiEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "nameExplicit": false, + "columns": [ + "integrationMetaCatalogId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMetaCatalog", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogItem_wJXyKUssR08y_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogItem_productId_Product_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogSyncRun_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "nameExplicit": false, + "columns": [ + "integrationMetaCatalogId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMetaCatalog", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogSyncRun_8PnmCJ0uISUd_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MetaCatalogSyncRun_categoryId_ProductCategory_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniApp", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniApp_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "nameExplicit": false, + "columns": [ + "miniAppId" + ], + "schemaTo": "public", + "tableTo": "MiniApp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppPublication_miniAppId_MiniApp_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppPublication_oBb1VPqI8uvn_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "nameExplicit": false, + "columns": [ + "whatsappFlowId" + ], + "schemaTo": "public", + "tableTo": "WhatsappFlow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MiniAppPublication_whatsappFlowId_WhatsappFlow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppSubmission_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "nameExplicit": false, + "columns": [ + "miniAppId" + ], + "schemaTo": "public", + "tableTo": "MiniApp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppSubmission_miniAppId_MiniApp_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MiniAppSubmission_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppUpload_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": false, + "columns": [ + "miniAppId" + ], + "schemaTo": "public", + "tableTo": "MiniApp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppUpload_miniAppId_MiniApp_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppUpload_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "nameExplicit": false, + "columns": [ + "submissionId" + ], + "schemaTo": "public", + "tableTo": "MiniAppSubmission", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MiniAppUpload_submissionId_MiniAppSubmission_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Minigame", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Minigame_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": false, + "columns": [ + "minigameId" + ], + "schemaTo": "public", + "tableTo": "Minigame", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigameContact_minigameId_Minigame_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigameContact_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": false, + "columns": [ + "referrerContactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MinigameContact_referrerContactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MinigameContact", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MinigameContact_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MinigamePlay", + "nameExplicit": false, + "columns": [ + "minigameId" + ], + "schemaTo": "public", + "tableTo": "Minigame", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigamePlay_minigameId_Minigame_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "MinigamePlay", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigamePlay_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "PlatformCredential", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Credential_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Product", + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_categoryId_ProductCategory_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Product", + "nameExplicit": false, + "columns": [ + "subcategoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_subcategoryId_ProductCategory_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Product", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Product_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ProductAddon", + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductAddon_productId_Product_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ProductCategory", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductCategory_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ProductCategory", + "nameExplicit": false, + "columns": [ + "parentId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductCategory_parentId_ProductCategory_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ProductVariant", + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductVariant_productId_Product_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductVariantOption_productId_Product_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "nameExplicit": false, + "columns": [ + "submissionId" + ], + "schemaTo": "public", + "tableTo": "QuestionnaireSubmission", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireAnswer_l8clOEM7NsPl_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "nameExplicit": false, + "columns": [ + "questionId" + ], + "schemaTo": "public", + "tableTo": "QuestionnaireQuestion", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireAnswer_questionId_QuestionnaireQuestion_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Questionnaire", + "nameExplicit": false, + "columns": [ + "triggerFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Questionnaire_triggerFlowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Questionnaire", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Questionnaire_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "nameExplicit": false, + "columns": [ + "questionnaireId" + ], + "schemaTo": "public", + "tableTo": "Questionnaire", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireQuestion_questionnaireId_Questionnaire_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireQuestion_customFieldId_CustomField_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": false, + "columns": [ + "questionnaireId" + ], + "schemaTo": "public", + "tableTo": "Questionnaire", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_questionnaireId_Questionnaire_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireSubmission_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "nameExplicit": false, + "columns": [ + "currentQuestionId" + ], + "schemaTo": "public", + "tableTo": "QuestionnaireQuestion", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireSubmission_mha0bYFxcV7A_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "RefLinkStat", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "RefLinkStat_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "RefLinkStat", + "nameExplicit": false, + "columns": [ + "linkId" + ], + "schemaTo": "public", + "tableTo": "Reflink", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "RefLinkStat_linkId_Reflink_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Reflink", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Reflink_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Reflink", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Reflink_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Reflink", + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Reflink_customFieldId_CustomField_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Reflink", + "nameExplicit": false, + "columns": [ + "widgetLogoFileId" + ], + "schemaTo": "public", + "tableTo": "MediaLibraryFile", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Reflink_widgetLogoFileId_MediaLibraryFile_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ResponseSlaPolicy_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SavedReply", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReply_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "nameExplicit": false, + "columns": [ + "savedReplyId" + ], + "schemaTo": "public", + "tableTo": "SavedReply", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReplyImage_savedReplyId_SavedReply_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "nameExplicit": false, + "columns": [ + "mediaLibraryFileId" + ], + "schemaTo": "public", + "tableTo": "MediaLibraryFile", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReplyImage_mediaLibraryFileId_MediaLibraryFile_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReplyImage_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Sequence", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Sequence_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Sequence", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Sequence_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": false, + "columns": [ + "sequenceId" + ], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_sequenceId_Sequence_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": false, + "columns": [ + "stepId" + ], + "schemaTo": "public", + "tableTo": "SequenceStep", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_stepId_SequenceStep_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "nameExplicit": true, + "columns": [ + "enrollmentId", + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "ContactOnSequence", + "columnsTo": [ + "id", + "workspaceId" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_enrollment_workspace_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceStep", + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "SequenceStep_flowId_Flow_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "SequenceStep", + "nameExplicit": false, + "columns": [ + "sequenceId" + ], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceStep_sequenceId_Sequence_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Spreadsheet", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Spreadsheet_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Tag", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Tag_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Tag", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Tag_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TagChannel", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TagChannel_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TagChannel", + "nameExplicit": false, + "columns": [ + "tagId" + ], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TagChannel_tagId_Tag_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TelegramChat", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TelegramChat_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TelegramChat", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TelegramChat_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Template", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Template_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Template", + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Template_tenantId_Tenant_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Template", + "nameExplicit": false, + "columns": [ + "createdBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Template_createdBy_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstallation_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": false, + "columns": [ + "templateId" + ], + "schemaTo": "public", + "tableTo": "Template", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_templateId_Template_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": false, + "columns": [ + "installFolderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_installFolderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "nameExplicit": false, + "columns": [ + "installedBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_installedBy_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "nameExplicit": false, + "columns": [ + "installationId" + ], + "schemaTo": "public", + "tableTo": "TemplateInstallation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstalledResource_a0BqwWeO96EB_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstalledResource_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Trigger", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Trigger_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Trigger", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Trigger_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Condition_triggerId_Trigger_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Condition", + "nameExplicit": false, + "columns": [ + "webhookId" + ], + "schemaTo": "public", + "tableTo": "Webhook", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Condition_webhookId_Webhook_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_triggerId_Trigger_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerExecution", + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_triggerId_Trigger_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerExecution", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerExecution", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerStat", + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerStat_triggerId_Trigger_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "TriggerStat", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerStat_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserDeviceToken_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserDeviceToken_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserPersistentMenu_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Webhook", + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Webhook_folderId_Folder_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Webhook", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Webhook_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WebhookExecution", + "nameExplicit": false, + "columns": [ + "webhookId" + ], + "schemaTo": "public", + "tableTo": "Webhook", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_webhookId_Webhook_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WebhookExecution", + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_contactId_Contact_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WebhookExecution", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappBusinessAccount_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": false, + "columns": [ + "answeredByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "WhatsappCall_answeredByUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": false, + "columns": [ + "initiatedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "WhatsappCall_initiatedByUserId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_inboxId_Inbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_conversationId_Conversation_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCallPermission_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCallPermission_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappFlow_integrationWhatsappId_IntegrationWhatsapp_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappMessageTemplate_p6pSomUTTJCm_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_ownerId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHours", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHours_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursDateOverride_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "nameExplicit": true, + "columns": [ + "workingHoursId", + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "WorkingHours", + "columnsTo": [ + "id", + "workspaceId" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursDateOverride_workingHoursId_workspaceId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "nameExplicit": false, + "columns": [ + "workingHoursId" + ], + "schemaTo": "public", + "tableTo": "WorkingHours", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursInterval_workingHoursId_WorkingHours_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursMember_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursMember_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "nameExplicit": true, + "columns": [ + "workingHoursId", + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "WorkingHours", + "columnsTo": [ + "id", + "workspaceId" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursMember_workingHoursId_workspaceId_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Workspace", + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Workspace_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "Workspace", + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Workspace_tenantId_Tenant_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceApiToken_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMac_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMember_workspaceId_Workspace_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMember_userId_User_id_fkey", + "entityType": "fks" + }, + { + "schema": "public", + "table": "AnalyticsAgentResponseEvent", + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsAgentResponseEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsBotMessageEvent", + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsBotMessageEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsBroadcastEvent", + "columns": [ + "broadcastId", + "contactInboxId", + "batchId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsBroadcastEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsContactEvent", + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsContactEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsConversationEvent", + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsConversationEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsFlowNodeEvent", + "columns": [ + "flowId", + "analyticsId", + "nodeId", + "buttonId", + "contactInboxId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsFlowNodeEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsMessageEvent", + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsMessageEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsSequenceEvent", + "columns": [ + "sequenceId", + "stepId", + "contactInboxId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsSequenceEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Attachment", + "columns": [ + "id", + "createdAt" + ], + "nameExplicit": false, + "name": "Attachment_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AutomationThrottle", + "columns": [ + "workspaceId", + "contactInboxId", + "throttleType", + "subjectId" + ], + "nameExplicit": true, + "name": "AutomationThrottle_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "BroadcastTarget", + "columns": [ + "broadcastId", + "inboxId" + ], + "nameExplicit": true, + "name": "BroadcastTarget_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactActiveHourly", + "columns": [ + "workspaceId", + "hourBucket", + "contactInboxId" + ], + "nameExplicit": false, + "name": "ContactActiveHourly_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactActiveMonthly", + "columns": [ + "workspaceId", + "periodStart", + "contactInboxId" + ], + "nameExplicit": false, + "name": "ContactActiveMonthly_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactInboxPost", + "columns": [ + "workspaceId", + "contactInboxId", + "postId" + ], + "nameExplicit": true, + "name": "ContactInboxPost_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactOnBroadcast", + "columns": [ + "broadcastId", + "contactId" + ], + "nameExplicit": true, + "name": "ContactsOnBroadcast_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactOnSequence", + "columns": [ + "id", + "workspaceId" + ], + "nameExplicit": true, + "name": "ContactOnSequence_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactToTag", + "columns": [ + "contactId", + "tagId" + ], + "nameExplicit": false, + "name": "ContactToTag_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactToTagChannel", + "columns": [ + "tagChannelId", + "contactInboxId" + ], + "nameExplicit": false, + "name": "ContactToTagChannel_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "LeaderboardParticipant", + "columns": [ + "leaderboardId", + "contactId" + ], + "nameExplicit": false, + "name": "LeaderboardParticipant_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "LeaderboardScoreEvent", + "columns": [ + "createdAt", + "id" + ], + "nameExplicit": false, + "name": "LeaderboardScoreEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Message", + "columns": [ + "id", + "createdAt" + ], + "nameExplicit": false, + "name": "Message_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "SequenceDispatch", + "columns": [ + "id", + "workspaceId" + ], + "nameExplicit": true, + "name": "SequenceDispatch_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TriggerContactHistory", + "columns": [ + "id", + "contactId" + ], + "nameExplicit": true, + "name": "TriggerContactHistory_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MessageShard", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessageShard_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ShardTimeRange", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ShardTimeRange_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AdsConversionEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AdsConversionRule", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AdsConversionRule_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIAgent", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIAgent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIConversationEmbedding", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIConversationEmbedding_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIConversationSource", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIConversationSource_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIEmbedding", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIEmbedding_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIFile", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIFile_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIFunction", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIFunction_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIHandoverBulkRun", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIHandoverBulkRun_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIHandoverSettings", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIHandoverSettings_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AIMCPServer", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIMCPServer_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AnalyticsEmailTopic", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AnalyticsEmailTopic_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Appointment", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Appointment_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AppointmentCalendar", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentCalendar_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AppointmentCalendarAvailability", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentCalendarAvailability_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AppointmentCalendarReminder", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentCalendarReminder_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AppointmentReminderDispatch", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentReminderDispatch_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Account", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Account_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Invitation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Invitation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Jwk", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Jwk_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Session", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Session_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "User", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "User_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Verification", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Verification_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AutomatedResponse", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AutomatedResponse_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "BotField", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "BotField_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Broadcast", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Broadcast_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "BroadcastRecurrence", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "BroadcastRecurrence_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "BroadcastRecurrenceOccurrence_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ChannelPost", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ChannelPost_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CoexistSyncRun", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CoexistSyncRun_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CommentAutomation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CommentAutomationEvent", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomationEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CommentAutomationMiss", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomationMiss_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CommentAutomationReply", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomationReply_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ConnectSession", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ConnectSession_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Connection", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Connection_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Contact", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Contact_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactCustomField", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactCustomField_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactInbox", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactInbox_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactNote", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactNote_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ContactOnSmartDelay", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactOnSmartDelay_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Conversation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Conversation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ConversationParticipant", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ConversationParticipant_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Coupon", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Coupon_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CouponTopic", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CouponTopic_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CustomField", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CustomField_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "DecisionConnection", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DecisionConnection_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "DecisionProfile", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DecisionProfile_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "DynamicImage", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DynamicImage_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "EmailTopic", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "EmailTopic_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "AuditLog", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AuditLog_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "CustomDomain", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CustomDomain_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "License", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "License_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "PlatformAdmin", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "PlatformAdmin_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Tenant", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Tenant_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TenantHelpItem", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TenantHelpItem_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "UserQuota", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "UserQuota_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceUsage_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ErrorLog", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ErrorLog_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ExternalWebhook", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ExternalWebhook_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookLeadAdsAutomation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FacebookLeadAdsLead", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookLeadAdsLead_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FacebookMarketingMessage", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookMarketingMessage_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookMarketingMessagesAuth_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "File", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "File_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Flow", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Flow_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FlowAnalyticsSession", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowAnalyticsSession_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FlowNodeStat", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowNodeStat_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FlowRun", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowRun_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "FlowVersion", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowVersion_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Folder", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Folder_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "GoogleAdsConversionEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "GoogleAdsSettings", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "GoogleAdsSettings_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IgStoryAutomation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IgStoryAutomation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Import", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Import_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "InboundWebhook", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboundWebhook_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "InboundWebhookRequest", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboundWebhookRequest_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Inbox", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Inbox_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "InboxContactStat", + "columns": [ + "inboxId" + ], + "nameExplicit": false, + "name": "InboxContactStat_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "InboxTeam", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboxTeam_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "InboxTeamMember", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboxTeamMember_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationActiveCampaign", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationActiveCampaign_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationApi", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationApi_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Integration", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Integration_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationClaude", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationClaude_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationDeepseek", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationDeepseek_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationDrip", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationDrip_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationFacebookAds", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationFacebookAds_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationGemini", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGemini_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationGetResponse", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGetResponse_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationGoogleAds", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGoogleAds_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationGoogleCalendar", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGoogleCalendar_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationGoogleSheet", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGoogleSheet_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationInstagram", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationInstagram_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationKlaviyo", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationKlaviyo_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationMailchimp", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMailchimp_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationMailerLite", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMailerLite_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationMessenger", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMessenger_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationMetaCatalog", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMetaCatalog_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationMoosend", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMoosend_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationOpenai", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOpenai_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOpenaiCompatible_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationOpenrouter", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOpenrouter_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationOutlookCalendar", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOutlookCalendar_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationSendGrid", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationSendGrid_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationSmtp", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationSmtp_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationTelegram", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationTelegram_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationThreads", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationThreads_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationTiktok", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationTiktok_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationWebchat", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationWebchat_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationWhatsapp_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "IntegrationZalo", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationZalo_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Leaderboard", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Leaderboard_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "LeaderboardAuditLog", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "LeaderboardAuditLog_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MagicLink", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MagicLink_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MediaLibraryFile", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MediaLibraryFile_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MediaLibraryFolder", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MediaLibraryFolder_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MessageCleanup", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessageCleanup_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessagingAdOperation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessagingAdsConnection_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MessengerMessageTemplate", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessengerMessageTemplate_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessengerWelcomeMessageFlow_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MetaCapiEvent_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MetaCatalogItem", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MetaCatalogItem_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MetaCatalogSyncRun", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MetaCatalogSyncRun_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MiniApp", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniApp_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MiniAppPublication", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniAppPublication_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MiniAppSubmission", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniAppSubmission_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MiniAppUpload", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniAppUpload_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Minigame", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Minigame_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MinigameContact", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MinigameContact_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "MinigamePlay", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MinigamePlay_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "PlatformCredential", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Credential_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Product", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Product_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ProductAddon", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductAddon_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ProductCategory", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductCategory_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ProductVariant", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductVariant_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ProductVariantOption", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductVariantOption_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "QuestionnaireAnswer", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "QuestionnaireAnswer_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Questionnaire", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Questionnaire_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "QuestionnaireQuestion_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "QuestionnaireSubmission", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "QuestionnaireSubmission_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Reflink", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Reflink_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ResponseSlaPolicy_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "SavedReply", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SavedReply_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "SavedReplyImage", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SavedReplyImage_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Sequence", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Sequence_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "SequenceStep", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SequenceStep_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Spreadsheet", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Spreadsheet_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "SystemField", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SystemField_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Tag", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Tag_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TagChannel", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TagChannel_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TelegramChat", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TelegramChat_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Template", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Template_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TemplateInstallation", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TemplateInstallation_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TemplateInstalledResource", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TemplateInstalledResource_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Trigger", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Trigger_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Condition", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Condition_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TriggerExecution", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TriggerExecution_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "TriggerStat", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TriggerStat_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "UserDeviceToken_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "UserPersistentMenu", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "UserPersistentMenu_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Webhook", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Webhook_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WebhookExecution", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WebhookExecution_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappBusinessAccount", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappBusinessAccount_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappCall", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappCall_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappCallPermission", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappCallPermission_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappCoexistStaging", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappCoexistStaging_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappFlow", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappFlow_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappMessageTemplate", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappMessageTemplate_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappSignupSession_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkingHours", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHours_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkingHoursDateOverride", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHoursDateOverride_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHoursInterval_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHoursMember_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Workspace", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Workspace_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceApiToken_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceMac_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "WorkspaceMember", + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceMember_pkey", + "entityType": "pks" + }, + { + "schema": "public", + "table": "Message", + "nameExplicit": true, + "columns": [ + "contactInboxId", + "sourceId", + "createdAt" + ], + "nullsNotDistinct": false, + "name": "Message_source_dedup_idx", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "ProductCategory", + "nameExplicit": true, + "columns": [ + "workspaceId", + "parentId", + "name" + ], + "nullsNotDistinct": true, + "name": "ProductCategory_workspaceId_parent_name_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "ResponseSlaPolicy_workspaceId_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "UserDeviceToken", + "nameExplicit": true, + "columns": [ + "token" + ], + "nullsNotDistinct": false, + "name": "UserDeviceToken_token_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "WorkingHours", + "nameExplicit": true, + "columns": [ + "id", + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "WorkingHours_id_workspaceId_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "WorkingHoursMember", + "nameExplicit": true, + "columns": [ + "workspaceId", + "userId" + ], + "nullsNotDistinct": false, + "name": "WorkingHoursMember_workspaceId_userId_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "WorkspaceApiToken", + "nameExplicit": true, + "columns": [ + "tokenHash" + ], + "nullsNotDistinct": false, + "name": "WorkspaceApiToken_tokenHash_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "WorkspaceMac", + "nameExplicit": true, + "columns": [ + "workspaceId", + "periodStart", + "periodEnd" + ], + "nullsNotDistinct": false, + "name": "WorkspaceMac_workspaceId_periodStart_periodEnd_unique", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "UserQuota", + "nameExplicit": false, + "columns": [ + "userId" + ], + "nullsNotDistinct": false, + "name": "UserQuota_userId_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "WorkspaceUsage", + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "WorkspaceUsage_workspaceId_key", + "entityType": "uniques" + }, + { + "schema": "public", + "table": "AdsConversionEvent", + "value": "(\"channel\" = 'whatsapp' AND \"integrationWhatsappId\" IS NOT NULL AND \"ctwaClid\" IS NOT NULL AND \"wabaId\" IS NOT NULL) OR (\"channel\" = 'messenger' AND \"integrationMessengerId\" IS NOT NULL) OR (\"channel\" = 'instagram' AND \"integrationInstagramId\" IS NOT NULL)", + "name": "AdsConversionEvent_channel_integration_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Broadcast", + "value": "\"parentBroadcastId\" IS NULL OR \"occurrenceAt\" IS NOT NULL", + "name": "Broadcast_occurrence_pair_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "((\"actorUserId\" IS NOT NULL)::int + (\"actorTokenId\" IS NOT NULL)::int) <= 1", + "name": "ConnectSession_actor_at_most_one", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "\"status\" IN ('pending', 'authorized', 'awaiting_selection', 'completed', 'failed', 'expired', 'cancelled')", + "name": "ConnectSession_status_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "\"purpose\" IN ('connect', 'reconnect', 'facebook_ads', 'messaging_ads', 'lead_ads', 'meta_catalog')", + "name": "ConnectSession_purpose_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "\"errorCode\" IN ('state_mismatch', 'expired', 'provider_denied', 'exchange_failed', 'provider_error', 'no_candidates', 'already_connected', 'quota_exceeded', 'trial_expired', 'internal_error')", + "name": "ConnectSession_errorCode_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "\"errorCode\" IS NULL OR \"status\" IN ('failed', 'expired', 'cancelled')", + "name": "ConnectSession_errorCode_terminal_failure_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "(\"status\" IN ('completed', 'failed', 'expired', 'cancelled')) = (\"consumedAt\" IS NOT NULL)", + "name": "ConnectSession_terminal_consumedAt_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "\"status\" NOT IN ('completed', 'failed', 'expired', 'cancelled') OR \"encryptedAuth\" IS NULL", + "name": "ConnectSession_terminal_clears_encryptedAuth_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ConnectSession", + "value": "\"purpose\" <> 'reconnect' OR \"status\" IN ('completed', 'failed', 'expired', 'cancelled') OR \"targetConnectionId\" IS NOT NULL", + "name": "ConnectSession_active_reconnect_requires_target_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "(\n (\"kind\" = 'channel' AND \"inboxId\" IS NOT NULL AND \"channel\" IS NOT NULL)\n OR\n (\"kind\" = 'integration' AND \"inboxId\" IS NULL AND \"channel\" IS NULL AND \"integrationId\" IS NOT NULL)\n )", + "name": "Connection_kind_relation_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "NOT (\"inboxId\" IS NOT NULL AND \"integrationId\" IS NOT NULL)", + "name": "Connection_inbox_integration_exclusive_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "\"kind\" IN ('channel', 'integration')", + "name": "Connection_kind_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "\"status\" IN ('connected', 'degraded', 'needs_reauth', 'paused', 'disconnected')", + "name": "Connection_status_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "\"statusReason\" IN ('manual', 'workspace_purge', 'trial_expired', 'tenant_suspended', 'token_revoked', 'provider_revoked', 'refresh_failed', 'verify_failed', 'quota_exceeded', 'orphaned_webhook')", + "name": "Connection_statusReason_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "(\"status\" = 'connected') = (\"statusReason\" IS NULL)", + "name": "Connection_status_reason_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "Connection", + "value": "(\"status\" = 'disconnected') = (\"disconnectedAt\" IS NOT NULL)", + "name": "Connection_disconnectedAt_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"status\" NOT IN ('sent', 'processed') OR (\"requestId\" IS NOT NULL AND \"sentAt\" IS NOT NULL)", + "name": "GoogleAdsConversionEvent_sent_requires_request_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"status\" <> 'sending' OR (\"claimToken\" IS NOT NULL AND \"claimedAt\" IS NOT NULL)", + "name": "GoogleAdsConversionEvent_sending_requires_claim_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"processingStatus\" IS NULL OR \"status\" IN ('sent', 'processed', 'failed')", + "name": "GoogleAdsConversionEvent_processing_status_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"failureStage\" IS NULL OR \"status\" = 'failed'", + "name": "GoogleAdsConversionEvent_failure_stage_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "(\"value\" IS NULL) = (\"currency\" IS NULL)", + "name": "GoogleAdsConversionEvent_value_currency_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"value\" IS NULL OR \"value\" >= 0", + "name": "GoogleAdsConversionEvent_value_non_negative_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "length(\"clickId\") BETWEEN 10 AND 512", + "name": "GoogleAdsConversionEvent_clickId_length_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"uploadMethod\" IN ('dataManager', 'legacy')", + "name": "GoogleAdsConversionEvent_uploadMethod_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "GoogleAdsConversionEvent", + "value": "\"attempt\" >= 0 AND \"processingAttempts\" >= 0", + "name": "GoogleAdsConversionEvent_attempt_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "IntegrationWhatsapp", + "value": "(\"registrationStatus\" <> 'failed' OR \"registrationError\" IS NOT NULL)\n AND (\"registrationStatus\" <> 'registered' OR \"registrationError\" IS NULL)", + "name": "IntegrationWhatsapp_registrationStatus_error_consistent", + "entityType": "checks" + }, + { + "schema": "public", + "table": "MessagingAdOperation", + "value": "(\"channel\" = 'whatsapp' AND \"integrationWhatsappId\" IS NOT NULL AND \"integrationMessengerId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'messenger' AND \"integrationMessengerId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'instagram' AND \"integrationInstagramId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationMessengerId\" IS NULL)", + "name": "MessagingAdOperation_channel_integration_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "MessagingAdsConnection", + "value": "(\"channel\" = 'whatsapp' AND \"integrationWhatsappId\" IS NOT NULL AND \"integrationMessengerId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'messenger' AND \"integrationMessengerId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'instagram' AND \"integrationInstagramId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationMessengerId\" IS NULL)", + "name": "MessagingAdsConnection_channel_integration_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "value": "\"channel\" IN ('messenger', 'instagram', 'whatsapp')", + "name": "MetaCapiEvent_channel_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "value": "\"actionSource\" IN ('business_messaging', 'email', 'phone_call', 'chat', 'physical_store', 'system_generated', 'other')", + "name": "MetaCapiEvent_actionSource_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "MetaCapiEvent", + "value": "\"contentType\" IN ('product', 'product_group')", + "name": "MetaCapiEvent_contentType_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "QuestionnaireQuestion", + "value": "(\"customFieldId\" IS NULL) OR (\"systemFieldKey\" IS NULL)", + "name": "QuestionnaireQuestion_customFieldId_systemFieldKey_exclusive", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "value": "\"firstResponseTargetSeconds\" > 0 AND (\"nextResponseTargetSeconds\" IS NULL OR \"nextResponseTargetSeconds\" > 0)", + "name": "ResponseSlaPolicy_targets_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "ResponseSlaPolicy", + "value": "\"breachingThresholdPercent\" BETWEEN 1 AND 99", + "name": "ResponseSlaPolicy_threshold_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "WhatsappSignupSession", + "value": "cardinality(\"candidatePhoneNumberIds\") > 0", + "name": "WhatsappSignupSession_candidates_not_empty", + "entityType": "checks" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "value": "\"weekday\" BETWEEN 0 AND 6", + "name": "WorkingHoursInterval_weekday_check", + "entityType": "checks" + }, + { + "schema": "public", + "table": "WorkingHoursInterval", + "value": "0 <= \"startMinute\" AND \"startMinute\" < \"endMinute\" AND \"endMinute\" <= 1440", + "name": "WorkingHoursInterval_minutes_check", + "entityType": "checks" + }, + { + "values": [ + "flow", + "flowNode", + "automatedResponse", + "whatsappFlow", + "emailTopic" + ], + "name": "contactActivityReferenceType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flowExecuted", + "flowNodeExecuted", + "automatedResponseMatched", + "formCompleted", + "messageSent", + "messageDelivered", + "messageOpened", + "messageClicked" + ], + "name": "contactActivityType", + "entityType": "enums", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactActivity", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "type": "contactActivityType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "activityType", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "type": "contactActivityReferenceType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referenceType", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentReferenceId", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referenceId", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstOccurredAt", + "schema": "public", + "table": "ContactActivity", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "activityType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "referenceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "parentReferenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "referenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactActivity_reference_idx", + "schema": "public", + "table": "ContactActivity", + "entityType": "indexes" + }, + { + "columns": [ + "workspaceId", + "contactId", + "activityType", + "referenceType", + "parentReferenceId", + "referenceId" + ], + "nameExplicit": true, + "name": "ContactActivity_pkey", + "schema": "public", + "table": "ContactActivity", + "entityType": "pks" + }, + { + "value": "(\"activityType\" = 'flowExecuted' AND \"referenceType\" = 'flow' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'flowNodeExecuted' AND \"referenceType\" = 'flowNode' AND \"parentReferenceId\" <> 0) OR (\"activityType\" = 'automatedResponseMatched' AND \"referenceType\" = 'automatedResponse' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'formCompleted' AND \"referenceType\" = 'whatsappFlow' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageSent' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageDelivered' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageOpened' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageClicked' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0)", + "name": "ContactActivity_allowed_pair_check", + "schema": "public", + "table": "ContactActivity", + "entityType": "checks" + }, + { + "isRlsEnabled": false, + "name": "ContactKeywordMessage", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automatedResponseId", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "normalizedText", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "normalizedText", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "ContactKeywordMessage_text_trgm_idx", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "normalizedText", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "text_pattern_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactKeywordMessage_text_prefix_idx", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "indexes" + }, + { + "columns": [ + "workspaceId", + "contactId", + "messageId" + ], + "nameExplicit": true, + "name": "ContactKeywordMessage_pkey", + "schema": "public", + "table": "ContactKeywordMessage", + "entityType": "pks" + }, + { + "isRlsEnabled": false, + "name": "ContactState", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "ContactState", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "schema": "public", + "table": "ContactState", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastDeliveredAt", + "schema": "public", + "table": "ContactState", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastDeliveredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"lastDeliveredAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactState_lastDeliveredAt_idx", + "schema": "public", + "table": "ContactState", + "entityType": "indexes" + }, + { + "columns": [ + "workspaceId", + "contactId" + ], + "nameExplicit": true, + "name": "ContactState_pkey", + "schema": "public", + "table": "ContactState", + "entityType": "pks" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicReferenceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicId", + "schema": "public", + "table": "AnalyticsEmailTopic", + "entityType": "columns" + }, + { + "nameExplicit": false, + "columns": [ + "topicId" + ], + "schemaTo": "public", + "tableTo": "EmailTopic", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_topicId_EmailTopic_id_fkey", + "schema": "public", + "table": "AnalyticsEmailTopic", + "entityType": "fks" + }, + { + "values": [ + "entireOrder", + "category", + "products" + ], + "name": "discountAppliesTo", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "everyone", + "specificCustomers" + ], + "name": "discountEligibility", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "none", + "amount", + "quantity" + ], + "name": "discountMinimumType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "percentage", + "fixedAmount", + "freeShipping" + ], + "name": "discountType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "default", + "externalLink", + "flow", + "productPage" + ], + "name": "checkoutMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "left", + "leftSpace", + "right", + "rightSpace" + ], + "name": "currencyPosition", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "default", + "flow", + "none" + ], + "name": "orderConfirmationMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "bigSquare", + "mediumRectangle" + ], + "name": "productImageSize", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "none", + "delivery", + "pickup", + "deliveryAndPickup" + ], + "name": "shippingMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "list", + "listWithoutImage", + "card", + "cardSquare", + "image", + "imageSquare" + ], + "name": "webshopProductView", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "user", + "apiToken", + "system", + "contact" + ], + "name": "orderActorType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "webshop", + "api", + "manual" + ], + "name": "orderSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "accepted", + "shipped", + "concluded", + "cancelled" + ], + "name": "orderStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "cod" + ], + "name": "paymentMethod", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "unpaid", + "paid", + "refunded" + ], + "name": "paymentStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "delivery", + "pickup" + ], + "name": "shippingType", + "entityType": "enums", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Cart", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "items", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCode", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastActivityAt", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "abandonedNotifiedAt", + "schema": "public", + "table": "Cart", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_workspaceId_contactId_key", + "schema": "public", + "table": "Cart", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_contactId_idx", + "schema": "public", + "table": "Cart", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_contactInboxId_idx", + "schema": "public", + "table": "Cart", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lastActivityAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"abandonedNotifiedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_abandoned_scan_idx", + "schema": "public", + "table": "Cart", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Cart_pkey", + "schema": "public", + "table": "Cart", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Cart_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "Cart", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Cart_contactId_Contact_id_fkey", + "schema": "public", + "table": "Cart", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Cart_contactInboxId_ContactInbox_id_fkey", + "schema": "public", + "table": "Cart", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "DiscountCode", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoApply", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "discountType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountType", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "discountValue", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "discountAppliesTo", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'entireOrder'", + "generated": null, + "identity": null, + "name": "appliesTo", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productIds", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "discountMinimumType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'none'", + "generated": null, + "identity": null, + "name": "minimumType", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "minimumValue", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "usageLimit", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "usedCount", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "oncePerCustomer", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "discountEligibility", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'everyone'", + "generated": null, + "identity": null, + "name": "eligibility", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerFilter", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "startsAt", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endsAt", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "schema": "public", + "table": "DiscountCode", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"code\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCode_workspaceId_code_key", + "schema": "public", + "table": "DiscountCode", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCode_categoryId_idx", + "schema": "public", + "table": "DiscountCode", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DiscountCode_pkey", + "schema": "public", + "table": "DiscountCode", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCode_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "DiscountCode", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "DiscountCode_categoryId_ProductCategory_id_fkey", + "schema": "public", + "table": "DiscountCode", + "entityType": "fks" + }, + { + "value": "\"usedCount\" >= 0 AND (\"usageLimit\" IS NULL OR \"usedCount\" <= \"usageLimit\")", + "name": "DiscountCode_usedCount_check", + "schema": "public", + "table": "DiscountCode", + "entityType": "checks" + }, + { + "isRlsEnabled": false, + "name": "EcommerceOpenHours", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ranges", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceOpenHours_workspaceId_idx", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "EcommerceOpenHours_pkey", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EcommerceOpenHours_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "EcommerceOrderCounter", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "EcommerceOrderCounter", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "lastNumber", + "schema": "public", + "table": "EcommerceOrderCounter", + "entityType": "columns" + }, + { + "columns": [ + "workspaceId" + ], + "nameExplicit": false, + "name": "EcommerceOrderCounter_pkey", + "schema": "public", + "table": "EcommerceOrderCounter", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EcommerceOrderCounter_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "EcommerceOrderCounter", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "EcommerceSettings", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderingAvailable", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "webshopProductView", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webshopProductView", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openHoursId", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "searchProducts", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "facebookPixelId", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "abandonedCartDelayMinutes", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "abandonedCartFlowId", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productButtons", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "productImageSize", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productImageSize", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "allowRateOrders", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notifyOnCartStatusChange", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "paymentMethods", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "currencyPosition", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencyPosition", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencySymbol", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "serviceFeePercent", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "shippingMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingType", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeAddress", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingCountries", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultShippingCountry", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveryCost", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "checkoutMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "checkoutMode", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "checkoutLink", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "checkoutFlowId", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minimumOrderValue", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "orderConfirmationMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'default'", + "generated": null, + "identity": null, + "name": "orderConfirmationMode", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderConfirmationFlowId", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireName", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireEmail", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requirePhone", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireState", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireZip", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_workspaceId_key", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "openHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_openHoursId_idx", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "abandonedCartFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_abandonedCartFlowId_idx", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "checkoutFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_checkoutFlowId_idx", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderConfirmationFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_orderConfirmationFlowId_idx", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "EcommerceSettings_pkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EcommerceSettings_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "openHoursId" + ], + "schemaTo": "public", + "tableTo": "EcommerceOpenHours", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_openHoursId_EcommerceOpenHours_id_fkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "abandonedCartFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_abandonedCartFlowId_Flow_id_fkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "checkoutFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_checkoutFlowId_Flow_id_fkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "orderConfirmationFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_orderConfirmationFlowId_Flow_id_fkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "fks" + }, + { + "value": "\"serviceFeePercent\" >= 0 AND \"serviceFeePercent\" <= 100", + "name": "EcommerceSettings_serviceFeePercent_check", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "checks" + }, + { + "isRlsEnabled": false, + "name": "DiscountCodeRedemption", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCodeId", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "amount", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCodeRedemption_orderId_key", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "discountCodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCodeRedemption_discountCodeId_contactId_idx", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCodeRedemption_contactId_idx", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DiscountCodeRedemption_pkey", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCodeRedemption_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "discountCodeId" + ], + "schemaTo": "public", + "tableTo": "DiscountCode", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCodeRedemption_discountCodeId_DiscountCode_id_fkey", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "orderId" + ], + "schemaTo": "public", + "tableTo": "Order", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCodeRedemption_orderId_Order_id_fkey", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "DiscountCodeRedemption_contactId_Contact_id_fkey", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "OrderItem", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "variantId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendorId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "variantLabel", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "combination", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sku", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retailerId", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendorName", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "unitPrice", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "quantity", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "stockTaken", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountPercent", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "taxPercent", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountTotal", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "taxTotal", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lineTotal", + "schema": "public", + "table": "OrderItem", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_orderId_idx", + "schema": "public", + "table": "OrderItem", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_workspaceId_productId_idx", + "schema": "public", + "table": "OrderItem", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "vendorId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_workspaceId_vendorId_idx", + "schema": "public", + "table": "OrderItem", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "variantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_variantId_idx", + "schema": "public", + "table": "OrderItem", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_categoryId_idx", + "schema": "public", + "table": "OrderItem", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "OrderItem_pkey", + "schema": "public", + "table": "OrderItem", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "orderId" + ], + "schemaTo": "public", + "tableTo": "Order", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderItem_orderId_Order_id_fkey", + "schema": "public", + "table": "OrderItem", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderItem_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "OrderItem", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_productId_Product_id_fkey", + "schema": "public", + "table": "OrderItem", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "variantId" + ], + "schemaTo": "public", + "tableTo": "ProductVariant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_variantId_ProductVariant_id_fkey", + "schema": "public", + "table": "OrderItem", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "vendorId" + ], + "schemaTo": "public", + "tableTo": "Vendor", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_vendorId_Vendor_id_fkey", + "schema": "public", + "table": "OrderItem", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_categoryId_ProductCategory_id_fkey", + "schema": "public", + "table": "OrderItem", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "Order", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "orderSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "orderStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "paymentMethod", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'cod'", + "generated": null, + "identity": null, + "name": "paymentMethod", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "paymentStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'unpaid'", + "generated": null, + "identity": null, + "name": "paymentStatus", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subtotal", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountTotal", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingTotal", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "serviceFeeTotal", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "taxTotal", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "couponDiscount", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "total", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCodeId", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCode", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerName", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerEmail", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerPhone", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "shippingType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingType", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingAddress", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "note", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rating", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ratingComment", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "acceptedAt", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippedAt", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "concludedAt", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelReason", + "schema": "public", + "table": "Order", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "number", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_workspaceId_number_key", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_workspaceId_createdAt_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_workspaceId_status_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_contactId_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_contactInboxId_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_inboxId_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_conversationId_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "discountCodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_discountCodeId_idx", + "schema": "public", + "table": "Order", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Order_pkey", + "schema": "public", + "table": "Order", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Order_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "Order", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_contactId_Contact_id_fkey", + "schema": "public", + "table": "Order", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_contactInboxId_ContactInbox_id_fkey", + "schema": "public", + "table": "Order", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_inboxId_Inbox_id_fkey", + "schema": "public", + "table": "Order", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_conversationId_Conversation_id_fkey", + "schema": "public", + "table": "Order", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "discountCodeId" + ], + "schemaTo": "public", + "tableTo": "DiscountCode", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_discountCodeId_DiscountCode_id_fkey", + "schema": "public", + "table": "Order", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "OrderStatusHistory", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "orderStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromStatus", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "orderStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "toStatus", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "orderActorType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorType", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorUserId", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "note", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderStatusHistory_orderId_createdAt_idx", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderStatusHistory_workspaceId_idx", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "actorUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderStatusHistory_actorUserId_idx", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "OrderStatusHistory_pkey", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "orderId" + ], + "schemaTo": "public", + "tableTo": "Order", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderStatusHistory_orderId_Order_id_fkey", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderStatusHistory_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "actorUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderStatusHistory_actorUserId_User_id_fkey", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "fks" + }, + { + "isRlsEnabled": false, + "name": "Vendor", + "schema": "public", + "entityType": "tables" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortDescription", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phone", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeAddress", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "discountPercent", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "minimumOrderValue", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openHoursId", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subcategoryId", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "schema": "public", + "table": "Vendor", + "entityType": "columns" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_workspaceId_idx", + "schema": "public", + "table": "Vendor", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "openHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_openHoursId_idx", + "schema": "public", + "table": "Vendor", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_categoryId_idx", + "schema": "public", + "table": "Vendor", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "subcategoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_subcategoryId_idx", + "schema": "public", + "table": "Vendor", + "entityType": "indexes" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_workspaceId_name_key", + "schema": "public", + "table": "Vendor", + "entityType": "indexes" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Vendor_pkey", + "schema": "public", + "table": "Vendor", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Vendor_workspaceId_Workspace_id_fkey", + "schema": "public", + "table": "Vendor", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "openHoursId" + ], + "schemaTo": "public", + "tableTo": "EcommerceOpenHours", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Vendor_openHoursId_EcommerceOpenHours_id_fkey", + "schema": "public", + "table": "Vendor", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Vendor_categoryId_ProductCategory_id_fkey", + "schema": "public", + "table": "Vendor", + "entityType": "fks" + }, + { + "nameExplicit": false, + "columns": [ + "subcategoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Vendor_subcategoryId_ProductCategory_id_fkey", + "schema": "public", + "table": "Vendor", + "entityType": "fks" + }, + { + "value": "\"discountPercent\" >= 0 AND \"discountPercent\" <= 100", + "name": "Vendor_discountPercent_check", + "schema": "public", + "table": "Vendor", + "entityType": "checks" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "keepOriginal", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendorId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isVisible", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AuditLog_createdAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "vendorId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_vendorId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": [ + "vendorId" + ], + "schemaTo": "public", + "tableTo": "Vendor", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_vendorId_Vendor_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + } + ], + "renames": [] +} \ No newline at end of file diff --git a/packages/database/drizzle/20261025021120_retain_workspace_billing/migration.sql b/packages/database/drizzle/20261025021120_retain_workspace_billing/migration.sql new file mode 100644 index 0000000000..ede7ef930b --- /dev/null +++ b/packages/database/drizzle/20261025021120_retain_workspace_billing/migration.sql @@ -0,0 +1,56 @@ +-- Retain workspace billing evidence past workspace deletion: bot-message usage +-- and the deletion record get their own tables, and WorkspaceMac stops cascading +-- from Workspace and is keyed by owner/tenant instead. +-- +-- Transactional on purpose: nothing here is CONCURRENTLY, so the runner wraps +-- the file in one transaction and a failure leaves no partial state. The +-- WorkspaceMac indexes and the FK validation live in the next migration +-- (add_workspace_mac_owner_indexes) because they cannot run in a transaction. +CREATE TABLE "WorkspaceBotMessageUsage" ( + "id" bigint PRIMARY KEY, + "createdAt" timestamp(6) with time zone DEFAULT now() NOT NULL, + "updatedAt" timestamp(6) with time zone DEFAULT now() NOT NULL, + "workspaceId" bigint NOT NULL, + "ownerId" bigint NOT NULL, + "tenantId" bigint NOT NULL, + "periodStart" timestamp(6) with time zone NOT NULL, + "periodEnd" timestamp(6) with time zone NOT NULL, + "count" integer DEFAULT 0 NOT NULL, + CONSTRAINT "WorkspaceBotMessageUsage_workspaceId_periodStart_key" UNIQUE("workspaceId","periodStart") +); +--> statement-breakpoint +CREATE TABLE "WorkspaceDeletionRecord" ( + "id" bigint PRIMARY KEY, + "createdAt" timestamp(6) with time zone DEFAULT now() NOT NULL, + "updatedAt" timestamp(6) with time zone DEFAULT now() NOT NULL, + "workspaceId" bigint NOT NULL CONSTRAINT "WorkspaceDeletionRecord_workspaceId_key" UNIQUE, + "workspaceName" text NOT NULL, + "ownerId" bigint NOT NULL, + "ownerEmail" text, + "tenantId" bigint NOT NULL, + "deletionRequestedById" bigint, + "deletionRequestedByEmail" text, + "deletionRequestedAt" timestamp(6) with time zone, + "scheduledDeletionAt" timestamp(6) with time zone, + "purgedAt" timestamp(6) with time zone, + "usageSnapshot" jsonb NOT NULL, + "details" jsonb NOT NULL +); +--> statement-breakpoint +ALTER TABLE "Workspace" ADD COLUMN "deletionRequestedById" bigint;--> statement-breakpoint +ALTER TABLE "Workspace" ADD COLUMN "deletionRequestedAt" timestamp(6) with time zone;--> statement-breakpoint +ALTER TABLE "WorkspaceMac" ADD COLUMN "ownerId" bigint;--> statement-breakpoint +ALTER TABLE "WorkspaceMac" ADD COLUMN "tenantId" bigint;--> statement-breakpoint +UPDATE "WorkspaceMac" AS mac +SET + "ownerId" = COALESCE(mac."ownerId", workspace."ownerId"), + "tenantId" = COALESCE(mac."tenantId", workspace."tenantId") +FROM "Workspace" AS workspace +WHERE mac."workspaceId" = workspace."id" + AND (mac."ownerId" IS NULL OR mac."tenantId" IS NULL);--> statement-breakpoint +ALTER TABLE "WorkspaceMac" DROP CONSTRAINT IF EXISTS "WorkspaceMac_workspaceId_Workspace_id_fkey";--> statement-breakpoint +CREATE INDEX "WorkspaceBotMessageUsage_ownerId_periodStart_idx" ON "WorkspaceBotMessageUsage" ("ownerId","periodStart");--> statement-breakpoint +CREATE INDEX "WorkspaceBotMessageUsage_tenantId_periodStart_idx" ON "WorkspaceBotMessageUsage" ("tenantId","periodStart");--> statement-breakpoint +CREATE INDEX "WorkspaceDeletionRecord_ownerEmail_idx" ON "WorkspaceDeletionRecord" ("ownerEmail");--> statement-breakpoint +ALTER TABLE "WorkspaceBotMessageUsage" ADD CONSTRAINT "WorkspaceBotMessageUsage_ownerId_User_id_fkey" FOREIGN KEY ("ownerId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint +ALTER TABLE "WorkspaceMac" ADD CONSTRAINT "WorkspaceMac_ownerId_User_id_fkey" FOREIGN KEY ("ownerId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE NOT VALID; diff --git a/packages/database/drizzle/20261025021120_retain_workspace_billing/snapshot.json b/packages/database/drizzle/20261025021120_retain_workspace_billing/snapshot.json new file mode 100644 index 0000000000..151ee277be --- /dev/null +++ b/packages/database/drizzle/20261025021120_retain_workspace_billing/snapshot.json @@ -0,0 +1,63308 @@ +{ + "id": "9cb9d9e1-e1a1-42c4-b7bd-8099d81756c4", + "prevIds": [ + "2e489004-42f1-4a07-83d3-c6cd07aa47ca" + ], + "version": "8", + "dialect": "postgres", + "ddl": [ + { + "values": [ + "pending", + "sent", + "failed", + "skipped_no_scope", + "skipped_region" + ], + "name": "adsConversionCapiStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "automatic", + "rule", + "trigger" + ], + "name": "adsConversionEventSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "whatsapp", + "facebook", + "messenger", + "instagram" + ], + "name": "adsConversionChannel", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "lead", + "purchase" + ], + "name": "adsConversionEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "success", + "error", + "processing" + ], + "name": "aiConversationEmbeddingStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "processing", + "success", + "error" + ], + "name": "aiConversationSourceStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "document", + "image", + "url", + "web_search" + ], + "name": "aiConversationSourceType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "success", + "error", + "processing" + ], + "name": "aiEmbeddingStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "enable", + "disable" + ], + "name": "aiHandoverBulkAction", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "running", + "cancelling", + "completed", + "failed", + "cancelled" + ], + "name": "aiHandoverBulkStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "automated_response", + "ai_agent", + "flow", + "none" + ], + "name": "analyticsBotResponseType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "success", + "fallback" + ], + "name": "analyticsBotResult", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flow", + "agent", + "fallback" + ], + "name": "analyticsBotRouteType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "message:sent", + "message:delivered", + "message:seen", + "message:failed", + "flow:clicked" + ], + "name": "analyticsBroadcastEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "contact_created", + "contact_deleted", + "contact_blocked" + ], + "name": "analyticsContactEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "bot", + "human" + ], + "name": "analyticsContactSenderType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "conversation_created", + "conversation_assigned", + "conversation_unassigned", + "conversation_transferred_to_human", + "conversation_transferred_to_bot", + "conversation_followed", + "conversation_unfollowed", + "conversation_archived", + "conversation_unarchived" + ], + "name": "analyticsConversationEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "message_human_sent", + "message_bot_sent" + ], + "name": "analyticsMessageEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "processing", + "ingested", + "failed" + ], + "name": "analyticsStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "synced", + "failed" + ], + "name": "appointmentExternalSyncStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "inPerson", + "phoneCall", + "onlineMeeting" + ], + "name": "appointmentLocationTypeSnapshot", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "scheduled", + "cancelled" + ], + "name": "appointmentStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "inPerson", + "phoneCall", + "onlineMeeting" + ], + "name": "appointmentLocationType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "rollingDays", + "dateRange", + "specificDay", + "anyFutureDate" + ], + "name": "appointmentScheduleWindowType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "minutes", + "hours", + "days" + ], + "name": "appointmentReminderTimingUnit", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "sent", + "cancelled", + "failed" + ], + "name": "appointmentReminderDispatchStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "image", + "video", + "audio", + "gif", + "file" + ], + "name": "fileType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "inbound", + "outbound" + ], + "name": "automatedResponseType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "defaultReply" + ], + "name": "automationThrottleType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "now", + "future", + "recurring" + ], + "name": "broadcastScheduleType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "scheduled", + "sent", + "sending", + "cancelled", + "draft", + "failed", + "recurring" + ], + "name": "broadcastStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "created", + "skipped", + "missed" + ], + "name": "broadcastOccurrenceOutcome", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "catchUpSuperseded", + "paused", + "draft", + "blockedOwner", + "planLimit", + "noTargets", + "undeliverable", + "excludedDate" + ], + "name": "broadcastOccurrenceReason", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "whatsapp", + "messenger", + "instagram" + ], + "name": "coexistChannel", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "contacts", + "messages" + ], + "name": "coexistMessengerSyncPhase", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "init", + "running", + "succeeded", + "failed", + "partial", + "waiting" + ], + "name": "coexistRunStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "coexist", + "contact_scan" + ], + "name": "coexistRunType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "messenger", + "instagram", + "instagramFacebook", + "threads", + "tiktok" + ], + "name": "commentAutomationType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "equal", + "contain" + ], + "name": "commentExcludeKeywordsType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "sent", + "failed" + ], + "name": "commentAutomationEventStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "public", + "private" + ], + "name": "commentAutomationReplyChannel", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "AIAgent", + "text", + "flow", + "none" + ], + "name": "commentAutomationReplyType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "outsideSchedule", + "postNotMatched", + "commentIsReply", + "keywordsNotMatched", + "mentionCountNotMatched", + "contactNotNew", + "alreadyRepliedOnPost", + "engagedOnOtherPost" + ], + "name": "commentAutomationMissReason", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "male", + "female", + "unknown" + ], + "name": "gender", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flow", + "flowNode", + "automatedResponse", + "whatsappFlow", + "emailTopic" + ], + "name": "contactActivityReferenceType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flowExecuted", + "flowNodeExecuted", + "automatedResponseMatched", + "formCompleted", + "messageSent", + "messageDelivered", + "messageOpened", + "messageClicked" + ], + "name": "contactActivityType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "captured", + "unavailable", + "failed" + ], + "name": "contactInboxProfileSnapshotState", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "text", + "location", + "refLink", + "image", + "video", + "audio", + "gif", + "file", + "storyMention" + ], + "name": "lastUserInputType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "inboundReceived", + "standbyReceived", + "controlPassed", + "controlTaken", + "taken", + "released", + "passed", + "serviceSent", + "serviceRejected" + ], + "name": "threadControlEvent", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "owned", + "standby", + "idle" + ], + "name": "threadControlState", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "scheduled", + "completed", + "failed", + "canceled" + ], + "name": "ContactOnSmartDelayStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "waitNode", + "followUp", + "quickReplyFollowUp" + ], + "name": "ContactOnSmartDelayType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "active", + "archived" + ], + "name": "couponTopicStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "shortText", + "email", + "phoneNumber", + "number", + "date", + "datetime", + "boolean", + "longText" + ], + "name": "customFieldType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "enabled", + "disabled" + ], + "name": "DecisionConnectionStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "passed", + "failed" + ], + "name": "DecisionConnectionTestStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "typesafe", + "systemOneCompatible", + "openrouterDecision" + ], + "name": "DecisionProviderKind", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "enabled", + "disabled" + ], + "name": "DecisionProfileStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "entireOrder", + "category", + "products" + ], + "name": "discountAppliesTo", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "everyone", + "specificCustomers" + ], + "name": "discountEligibility", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "none", + "amount", + "quantity" + ], + "name": "discountMinimumType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "percentage", + "fixedAmount", + "freeShipping" + ], + "name": "discountType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "default", + "externalLink", + "flow", + "productPage" + ], + "name": "checkoutMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "left", + "leftSpace", + "right", + "rightSpace" + ], + "name": "currencyPosition", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "default", + "flow", + "none" + ], + "name": "orderConfirmationMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "bigSquare", + "mediumRectangle" + ], + "name": "productImageSize", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "none", + "delivery", + "pickup", + "deliveryAndPickup" + ], + "name": "shippingMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "list", + "listWithoutImage", + "card", + "cardSquare", + "image", + "imageSquare" + ], + "name": "webshopProductView", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "import", + "generic", + "export" + ], + "name": "fileContextType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "uploaded", + "failed" + ], + "name": "fileStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "tag", + "flow", + "customField", + "automatedResponse", + "trigger", + "webhook", + "sequence", + "emailTopic", + "fbComment", + "igComment", + "igStory", + "outboundAutomatedResponse" + ], + "name": "folderType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "gclid", + "gbraid" + ], + "name": "googleAdsClickIdType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flowStep", + "triggerAction" + ], + "name": "googleAdsEventSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "sending", + "sent", + "processed", + "failed", + "skipped_no_account", + "skipped_expired" + ], + "name": "googleAdsEventStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "delivery", + "processing", + "timeout" + ], + "name": "googleAdsFailureStage", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "processing", + "success", + "partial_success", + "failed", + "unknown", + "timed_out" + ], + "name": "googleAdsProcessingStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "storyReply", + "storyMention" + ], + "name": "igStoryAutomationTrigger", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "instagram", + "instagramFacebook" + ], + "name": "igStoryAutomationType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "csv", + "xlsx", + "xls", + "json" + ], + "name": "importFormat", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "processing", + "completed", + "failed" + ], + "name": "importStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "contacts", + "coupons", + "products", + "flow" + ], + "name": "importType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "received", + "processing", + "processed", + "completedWithErrors", + "skipped", + "failed" + ], + "name": "inboundWebhookRequestStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "oauth", + "fbe" + ], + "name": "metaCatalogAuthMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "active", + "invalid" + ], + "name": "metaCatalogConnectionStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "idle", + "queued", + "running", + "succeeded", + "partial", + "failed" + ], + "name": "metaCatalogImportStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "metaNative", + "browserWhisper" + ], + "name": "whatsappCallRecordingMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "metaNative", + "browserWhisper" + ], + "name": "whatsappCallTranscriptionMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending_verification", + "registered", + "failed" + ], + "name": "whatsappRegistrationStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "messenger", + "instagram", + "whatsapp", + "zalo", + "telegram", + "tiktok", + "threads", + "email", + "gamification" + ], + "name": "leaderboardPlatform", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "draft", + "active", + "paused", + "finished" + ], + "name": "leaderboardStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "adjust", + "resetOne", + "resetAll", + "ban", + "unban" + ], + "name": "leaderboardAuditAction", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "rule", + "flow", + "referral", + "manual", + "reset" + ], + "name": "leaderboardScoreSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "text", + "location", + "refLink" + ], + "name": "contentType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "message", + "comment" + ], + "name": "messageKind", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "incoming", + "outgoing", + "activity" + ], + "name": "messageType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "bot", + "contact", + "system", + "user", + "api" + ], + "name": "senderType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "processing", + "completed", + "failed" + ], + "name": "MessageCleanupStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "whatsapp", + "messenger", + "instagram" + ], + "name": "messagingAdChannel", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "campaignCreated", + "adSetCreated", + "creativeCreated", + "adCreated", + "failed" + ], + "name": "messagingAdCreateState", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "draft", + "publishing", + "published", + "pausing", + "paused", + "deleting", + "deleted", + "publishFailed" + ], + "name": "messagingAdPublishState", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "push", + "import" + ], + "name": "metaCatalogItemDirection", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "all", + "category", + "selected" + ], + "name": "metaCatalogSyncScope", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "queued", + "running", + "succeeded", + "partial", + "failed" + ], + "name": "metaCatalogSyncStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "web" + ], + "name": "miniAppSubmissionSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "submitted" + ], + "name": "miniAppUploadStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "luckyWheel", + "jackpot", + "gashapon", + "drawLots", + "scratchOff" + ], + "name": "minigameType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "user", + "apiToken", + "system", + "contact" + ], + "name": "orderActorType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "webshop", + "api", + "manual" + ], + "name": "orderSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "accepted", + "shipped", + "concluded", + "cancelled" + ], + "name": "orderStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "cod" + ], + "name": "paymentMethod", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "unpaid", + "paid", + "refunded" + ], + "name": "paymentStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "delivery", + "pickup" + ], + "name": "shippingType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "dont_track", + "track" + ], + "name": "inventoryPolicy", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "text", + "number", + "email", + "phone", + "multipleChoice", + "date", + "datetime", + "image", + "file", + "location", + "websiteLink" + ], + "name": "questionnaireQuestionType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "inProgress", + "completed", + "cancelled", + "failed", + "timeout" + ], + "name": "questionnaireSubmissionStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "refLink", + "qrCode" + ], + "name": "ReflinkType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "me" + ], + "name": "SystemFieldType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "creator", + "administrator", + "member", + "restricted", + "left", + "kicked" + ], + "name": "telegramBotChatStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "private", + "group", + "supergroup", + "channel" + ], + "name": "telegramChatType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "installing", + "completed", + "partial", + "failed" + ], + "name": "templateInstallationStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flows", + "products", + "aiFunctions", + "aiAgents", + "calendars", + "webchats", + "keywords", + "entryPointLinks", + "triggers", + "fbCommentAutomations", + "settings", + "customFields", + "tags", + "productCategories" + ], + "name": "templateResourceCategory", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "ios", + "android" + ], + "name": "devicePlatform", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "userInitiated", + "businessInitiated" + ], + "name": "whatsappCallDirection", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "completed", + "failed", + "rejected", + "canceled" + ], + "name": "whatsappCallOutcome", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "ringing", + "accepted", + "rejected", + "completed", + "failed" + ], + "name": "whatsappCallStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "accept", + "reject" + ], + "name": "whatsappCallPermissionResponse", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "allTime", + "oncePerHour", + "oncePerDay" + ], + "name": "defaultReplyFrequency", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "full", + "read_only" + ], + "name": "WorkspaceApiTokenPermission", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "owner", + "agent" + ], + "name": "workspaceMemberRole", + "entityType": "enums", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessageShard", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ShardTimeRange", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AdsConversionEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AdsConversionRule", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIAgent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIConversationEmbedding", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIConversationSource", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIEmbedding", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIFile", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIFunction", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIHandoverBulkRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIHandoverSettings", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIMCPServer", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsAgentResponseEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsBotMessageEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsBroadcastEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsContactEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsConversationEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsFlowNodeEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsMessageEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsSequenceEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsEmailTopic", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsManifestStatus", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Appointment", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentCalendar", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentCalendarAvailability", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentCalendarReminder", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentReminderDispatch", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Attachment", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Account", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Invitation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Jwk", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Session", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "User", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Verification", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AutomatedResponse", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AutomationThrottle", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "BotField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Broadcast", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "BroadcastRecurrence", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "BroadcastRecurrenceOccurrence", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "BroadcastTarget", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Cart", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ChannelPost", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CoexistSyncRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CommentAutomation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CommentAutomationEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CommentAutomationMiss", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CommentAutomationReply", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ConnectSession", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Connection", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Contact", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactActiveHourly", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactActiveMonthly", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactActivity", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactCustomField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactInbox", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactInboxPost", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactKeywordMessage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactNote", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactOnBroadcast", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactOnSequence", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactOnSmartDelay", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactState", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactToTag", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactToTagChannel", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Conversation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ConversationParticipant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Coupon", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CouponTopic", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CustomField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "DecisionConnection", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "DecisionProfile", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "DiscountCode", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "DynamicImage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "EcommerceOpenHours", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "EcommerceOrderCounter", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "EcommerceSettings", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "EmailTopic", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AuditLog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CustomDomain", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "License", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "PlatformAdmin", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Tenant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TenantHelpItem", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "UserQuota", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceUsage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ErrorLog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ExternalWebhook", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FacebookLeadAdsAutomation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FacebookLeadAdsLead", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FacebookMarketingMessage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FacebookMarketingMessagesAuth", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "File", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Flow", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowAnalyticsSession", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowNodeStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowVersion", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Folder", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "GoogleAdsConversionEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "GoogleAdsSettings", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IgStoryAutomation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Import", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboundWebhook", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboundWebhookRequest", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Inbox", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboxContactStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboxTeam", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboxTeamMember", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationActiveCampaign", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationApi", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Integration", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationClaude", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationDeepseek", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationDrip", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationFacebookAds", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGemini", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGetResponse", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGoogleAds", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGoogleCalendar", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGoogleSheet", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationInstagram", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationKlaviyo", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMailchimp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMailerLite", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMessenger", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMetaCatalog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMoosend", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOpenai", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOpenaiCompatible", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOpenrouter", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOutlookCalendar", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationSendGrid", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationSmtp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationTelegram", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationThreads", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationTiktok", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationWebchat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationWhatsapp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationZalo", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Leaderboard", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "LeaderboardAuditLog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "LeaderboardParticipant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "LeaderboardScoreEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MagicLink", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MagicLinkStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MediaLibraryFile", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MediaLibraryFolder", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Message", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessageCleanup", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessagingAdOperation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessagingAdsConnection", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessengerMessageTemplate", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessengerWelcomeMessageFlow", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MetaCapiEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MetaCatalogItem", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MetaCatalogSyncRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MiniApp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MiniAppPublication", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MiniAppSubmission", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MiniAppUpload", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Minigame", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MinigameContact", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MinigamePlay", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "DiscountCodeRedemption", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "OrderItem", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Order", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "OrderStatusHistory", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "PlatformCredential", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Product", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductAddon", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductCategory", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductVariant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductVariantOption", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "QuestionnaireAnswer", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Questionnaire", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "QuestionnaireQuestion", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "QuestionnaireSubmission", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "RefLinkStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Reflink", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ResponseSlaPolicy", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SavedReply", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SavedReplyImage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Sequence", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SequenceDispatch", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SequenceStep", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Spreadsheet", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SystemField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Tag", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TagChannel", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TelegramChat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Template", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TemplateInstallation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TemplateInstalledResource", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Trigger", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Condition", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TriggerContactHistory", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TriggerExecution", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TriggerStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "UserDeviceToken", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "UserPersistentMenu", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Vendor", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Webhook", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WebhookExecution", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappBusinessAccount", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappCall", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappCallPermission", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappCoexistStaging", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappFlow", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappMessageTemplate", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappSignupSession", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkingHours", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkingHoursDateOverride", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkingHoursInterval", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkingHoursMember", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Workspace", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceApiToken", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceBotMessageUsage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceDeletionRecord", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceMac", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceMember", + "entityType": "tables", + "schema": "public" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "5432", + "generated": null, + "identity": null, + "name": "port", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "database", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credentialRef", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "'disable'", + "generated": null, + "identity": null, + "name": "sslMode", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isMain", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shardKey", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "readHost", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "readPort", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shardId", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'whatsapp'", + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionEventSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ctwaClid", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contents", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceEventId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionCapiStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "capiStatus", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiSentAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "adsConversionChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationFacebookAdsId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "adsConversionEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "trigger", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "markAs", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actionPrompt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "actionRules", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "messages", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isDefault", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isRichResponse", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "tools", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "webSearchAuthorizedDomains", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "models", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chunkIndex", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "vector(1536)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "embedding", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "aiConversationEmbeddingStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attachmentId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "aiConversationSourceType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceType", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "aiConversationSourceStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceKey", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentHash", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "summary", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "vector(1536)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "embedding", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "aiEmbeddingStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiFileId", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purpose", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dataCollect", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outputMessage", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerFlowId", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "aiHandoverBulkAction", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "aiHandoverBulkStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "message", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestedByUserId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestedAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastHeartbeatAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pausedUntil", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chunkSeq", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedCount", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cursorContactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inFlightFromId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inFlightToId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentError", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "scheduleEnabled", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timeRanges", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "gotoFlowId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "returnMessage", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "pauseBotWaitingForStaff", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "applyToAllCustomers", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "applyToAllRevision", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "applyToAllMessage", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "applyToAllRequestedByUserId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "availableTools", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "selectedTools", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "awaitingSince", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "measuredFrom", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseSeconds", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingResponseSeconds", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isFirstResponse", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slaTargetSeconds", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slaMet", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasResponse", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "analyticsBotResponseType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "analyticsBotRouteType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "routeType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "analyticsBotResult", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "result", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiProvider", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "analyticsBroadcastEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "batchId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "analyticsContactEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "analyticsContactSenderType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "analyticsConversationEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromAssignee", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "toAssignee", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "analyticsId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "buttonId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "analyticsMessageEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "analyticsContactSenderType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicReferenceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstSeenAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSeenAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seenCount", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstClickedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastClickedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clickCount", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "objectKey", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "analyticsStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ingestedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inviteeTimezone", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "appointmentStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'scheduled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "appointmentLocationTypeSnapshot", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationType", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationDetail", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventIntegrationId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventProviderCalendarId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "appointmentExternalSyncStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalSyncStatus", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "30", + "generated": null, + "identity": null, + "name": "durationMinutes", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bufferAfterMinutes", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "appointmentLocationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationType", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationDetail", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "appointmentScheduleWindowType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'rollingDays'", + "generated": null, + "identity": null, + "name": "scheduleWindowType", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "scheduleWindowConfig", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxAppointmentsPerUser", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "dailyLimitEnabled", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxPerDay", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowGroupMeeting", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxPerSlot", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "confirmationMessage", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "confirmationFlowId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancellationFlowId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalConnectionId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventTitleTemplate", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventDescriptionTemplate", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventAttendeesTemplate", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicLinkSlug", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "weekday", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startMinute", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endMinute", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timingValue", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "appointmentReminderTimingUnit", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timingUnit", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appointmentId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reminderConfigId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "appointmentReminderDispatchStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "jobId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sentAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedReason", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageCreatedAt", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "fileType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileType", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "width", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "height", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnailPath", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originPath", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "keepOriginal", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "providerId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accessToken", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accessTokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refreshToken", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refreshTokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idToken", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "password", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "invitedBy", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicKey", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "privateKey", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ipAddress", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "emailVerified", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isAnonymous", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "mustChangePassword", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "identifier", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "keywords", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "automatedResponseType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'inbound'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "type": "automationThrottleType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "throttleType", + "entityType": "columns", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subjectId", + "entityType": "columns", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastTriggeredAt", + "entityType": "columns", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimId", + "entityType": "columns", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "customFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateData", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'channel'", + "generated": null, + "identity": null, + "name": "targetMode", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "broadcastStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "broadcastScheduleType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schedulesType", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schedulesAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactFilter", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subaction", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactCount", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handoffCompletedAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "resumeCount", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "audienceRangeStart", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "audienceRangeEnd", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendRatePerMinute", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentBroadcastId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurrenceAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rule", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextRunAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountedThroughAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "occurrenceCount", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastOccurrenceAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pausedAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endedAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recurrenceId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "localSlot", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurrenceAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "broadcastOccurrenceOutcome", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outcome", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "broadcastOccurrenceReason", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "childBroadcastId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "materializedAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "supersededCount", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateData", + "entityType": "columns", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "items", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCode", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastActivityAt", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "abandonedNotifiedAt", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceAccountId", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalPostId", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "caption", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mediaType", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnail", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permalink", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publishedAt", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadataFetchedAt", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadataAttemptedAt", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistRunType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'coexist'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistRunStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'init'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerSource", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastHeartbeatAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalScan", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentScan", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentPageNumber", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedContactCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedMessageCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentError", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastPhase", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastChunkOrder", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "syncProgress", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistMessengerSyncPhase", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'contacts'", + "generated": null, + "identity": null, + "name": "messengerSyncPhase", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pendingPatches", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scanFromAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestedByUserId", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resumeCursor", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "commentAutomationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'messenger'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "repliesCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sentCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "deliveredCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seenCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clickedCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "missedCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "post", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"text\",\"value\":\"\"}'", + "generated": null, + "identity": null, + "name": "privateReply", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"none\",\"value\":null}'", + "generated": null, + "identity": null, + "name": "publicReply", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "includeKeywords", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "excludeKeywords", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "commentExcludeKeywordsType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'contain'", + "generated": null, + "identity": null, + "name": "excludeKeywordsType", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"replyToNewContactsOnly\":false,\"replyOncePerUserPerPost\":false,\"likeUserComment\":false,\"replyToUsersWhoCommentedOnOtherPosts\":true,\"ignoreCommentReplies\":true,\"trackUserTags\":false}'", + "generated": null, + "identity": null, + "name": "options", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"all\":false,\"hasPhoneNumber\":false,\"hasImage\":false,\"hasVideo\":false,\"hasLink\":false,\"hasKeywords\":false,\"hasGif\":false,\"hasEmoji\":false,\"keywords\":[],\"showCommentsAfter\":\"none\"}'", + "generated": null, + "identity": null, + "name": "hideComments", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"immediately\",\"value\":0}'", + "generated": null, + "identity": null, + "name": "replyAfter", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentText", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "commentAutomationReplyChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replyChannel", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "commentAutomationReplyType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replyType", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replyText", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "commentAutomationEventStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorDetail", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "httpCode", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentText", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "commentAutomationMissReason", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purpose", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "targetConnectionId", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorUserId", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorTokenId", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "platformOwnerId", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originHost", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "returnUrl", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stateNonceHash", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'authorize'", + "generated": null, + "identity": null, + "name": "step", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextAction", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAuth", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "targets", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "targetClaims", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "resultConnectionIds", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "results", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorCode", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "consumedAt", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "displayName", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'connected'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "statusReason", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "authExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connectedAt", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "avatar", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumber", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "emailVerified", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "emailOptIn", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstName", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastName", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "CASE\n WHEN \"firstName\" IS NULL AND \"lastName\" IS NULL THEN NULL\n WHEN \"firstName\" IS NULL THEN \"lastName\"\n WHEN \"lastName\" IS NULL THEN \"firstName\"\n ELSE \"firstName\" || ' ' || \"lastName\"\n END", + "type": "stored" + }, + "identity": null, + "name": "fullName", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "gender", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "gender", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastReadAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ref", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "city", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "location", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locale", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subscribedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastSubscribedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "blockedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalTagged", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalNewTagged", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hourBucket", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceMacId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "contactActivityType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "activityType", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "contactActivityReferenceType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referenceType", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentReferenceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referenceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstOccurredAt", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originalContactId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "followsBusiness", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessFollowsContact", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountVerified", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "followerCount", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "contactInboxProfileSnapshotState", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "profileSnapshotState", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "profileSnapshotAttempts", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "profileSnapshotNextAttemptAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "personaId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactLastReadAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstInteractionAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastIncomingMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastOutboundMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referral", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastCommentMessageId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastCommentMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "consecutiveFailedReply", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastInputFailure", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastErrorLog", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastBtnTitle", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUserInput", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "lastUserInputType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUserInputType", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webchatParentUrl", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceUserId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceParentUserId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceUsername", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceIdentityHistory", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "threadControlState", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlState", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadOwnerRole", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlUpdatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "threadControlEvent", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlLastEvent", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadOwnerAppId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadOwnerExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadPreviousOwnerAppId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactInboxPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactInboxPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns", + "schema": "public", + "table": "ContactInboxPost" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInboxPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automatedResponseId", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "normalizedText", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdById", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "sent", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "case when \"seenAt\" is null then false when \"deliveredAt\" is null then false else \"seenAt\" >= \"deliveredAt\" end", + "type": "stored" + }, + "identity": null, + "name": "isRead", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "enrolledAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextRunAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastStepId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextStepId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockOwner", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appointmentId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "ContactOnSmartDelayType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "ContactOnSmartDelayStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactState" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactState" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastDeliveredAt", + "entityType": "columns", + "schema": "public", + "table": "ContactState" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagChannelId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "botEnabled", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botResumeAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "archivedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "additionalAttributes", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactLastReadAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agentLastReadAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiContextLastMessageId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastActivityAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "followed", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedUserId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedInboxTeamId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastStep", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminRepliedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactRepliedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "awaitingHumanReplySince", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "awaitingHumanReplyClosedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedUserAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseDueAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseSlaBreachingAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseSlaTargetSeconds", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicId", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuedContactId", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuedAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "usedAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "couponTopicStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasEverHadCoupon", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdById", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "customFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "showInInbox", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "DecisionProviderKind", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "providerKind", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endpoint", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credential", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modelCatalog", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultModel", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "DecisionConnectionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'enabled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "DecisionConnectionTestStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastTestStatus", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastTestedAt", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "DecisionProfileStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'enabled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connectionId", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contract", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thresholdConfig", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "globalRouterEnabled", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "globalRouterConfig", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoApply", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "discountType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountType", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "discountValue", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "discountAppliesTo", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'entireOrder'", + "generated": null, + "identity": null, + "name": "appliesTo", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productIds", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "discountMinimumType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'none'", + "generated": null, + "identity": null, + "name": "minimumType", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "minimumValue", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "usageLimit", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "usedCount", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "oncePerCustomer", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "discountEligibility", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'everyone'", + "generated": null, + "identity": null, + "name": "eligibility", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerFilter", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "startsAt", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endsAt", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "data", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "backgroundUrl", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ranges", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOrderCounter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "lastNumber", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOrderCounter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderingAvailable", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "webshopProductView", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webshopProductView", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openHoursId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "searchProducts", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "facebookPixelId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "abandonedCartDelayMinutes", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "abandonedCartFlowId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productButtons", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "productImageSize", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productImageSize", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "allowRateOrders", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notifyOnCartStatusChange", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "paymentMethods", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "currencyPosition", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencyPosition", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencySymbol", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "serviceFeePercent", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "shippingMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingType", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeAddress", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingCountries", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultShippingCountry", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveryCost", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "checkoutMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "checkoutMode", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "checkoutLink", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "checkoutFlowId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minimumOrderValue", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "orderConfirmationMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'default'", + "generated": null, + "identity": null, + "name": "orderConfirmationMode", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderConfirmationFlowId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireName", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireEmail", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requirePhone", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireState", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireZip", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sendsTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "deliveredsTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seensTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clicksTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "detail", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ipAddress", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "domain", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verifiedAt", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfHostnameId", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfOwnershipValue", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfAcmeValue", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "License" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "License" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "License" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "licenseId", + "entityType": "columns", + "schema": "public", + "table": "License" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "License" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "License" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'super-admin'", + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disabledReason", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brandName", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logoLightPath", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logoDarkPath", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "faviconPath", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customCss", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customJs", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "theme", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storageUrl", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "policyUrl", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "termsOfServiceUrl", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "signupEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "forgotPasswordEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "magicLinkEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountCredentialsEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hiddenChannels", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "icon", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactsLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "contactsUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspacesLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "workspacesUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelsLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "channelsUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "teamMembersLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "teamMembersUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "macLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botMessagesLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "monthlyBotMessagesLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "monthlyBotMessagesUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "monthlyBotMessagesPeriodStart", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesTopUpGranted", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "whiteLabel", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "ssoSaml", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "saasMode", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "planName", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "planStatus", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "selectedTrialPlanId", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelsTornDownAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "syncedAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "contactsUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "channelsUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "teamMembersUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "syncedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "detail", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "httpCode", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stackTrace", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'make'", + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "event", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageName", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formName", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "fieldMapping", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "leadsHandledCount", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leadgenId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencyOffset", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "budgetType", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "budgetMinorUnits", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "campaignId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "facebookUserId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "facebookUserId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "fileContextType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contextType", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subType", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileName", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileSize", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "fileStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "meta", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadedAt", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enableInInbox", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentVersionId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "draftVersionId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "analyticsId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "buttonId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refType", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "nodes", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "edges", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isDraft", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isLatest", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startNodeId", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "folderType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderType", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isTrash", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "paths", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationGoogleAdsId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "loginCustomerId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionCustomerId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionName", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionCategory", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lookbackWindowDays", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "googleAdsEventSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scopeId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "googleAdsClickIdType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickIdType", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "googleClickReceivedAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transactionId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "options", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadMethod", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "googleAdsEventStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimedAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sentAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "googleAdsFailureStage", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failureStage", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "googleAdsProcessingStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingStatus", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingAttempts", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextProcessingCheckAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingDetail", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "settings", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "igStoryAutomationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "igStoryAutomationTrigger", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'storyReply'", + "generated": null, + "identity": null, + "name": "trigger", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "repliesCount", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "story", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"none\",\"value\":null}'", + "generated": null, + "identity": null, + "name": "reply", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "includeKeywords", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "importType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "importFormat", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "format", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "importStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "meta", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "processedCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "errorSample", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxResolution", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "identifiers", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fieldMappings", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actions", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sampleJson", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "requestCount", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboundWebhookId", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idempotencyKey", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clientIp", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "inboundWebhookRequestStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'received'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimedAt", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "skipReason", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorCode", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fieldErrors", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actionResults", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'connected'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "markReadOnOutbound", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disconnectReason", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlSeenAt", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "InboxContactStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalContacts", + "entityType": "columns", + "schema": "public", + "table": "InboxContactStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboxContactStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxTeamId", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenHash", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenPrefix", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callbackUrl", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationType", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "loginCustomerId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "descriptiveName", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencyCode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionCustomerId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "acceptedCustomerDataTerms", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActions", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionsSyncedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "setupError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "setupErrorAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'primary'", + "generated": null, + "identity": null, + "name": "providerCalendarId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userInfo", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "igId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "username", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistAiReadsSyncedHistory", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiTestEventCode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'instagram'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userInfo", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "personas", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "personaId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistAiReadsSyncedHistory", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiTestEventCode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "syncTagEnabledAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handoverResumeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogName", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAuth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "metaCatalogAuthMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'oauth'", + "generated": null, + "identity": null, + "name": "authMode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "metaCatalogConnectionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "metaCatalogImportStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'idle'", + "generated": null, + "identity": null, + "name": "importStatus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importTotalCount", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedCount", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importFailedCount", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "importError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastImportedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'VND'", + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeUrl", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReplyVoice", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "voice", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiAgentId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "baseURL", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultModel", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "preset", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'primary'", + "generated": null, + "identity": null, + "name": "providerCalendarId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromAddress", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadsUserId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "username", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enable", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "authorizedDomains", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brandColor", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hideHeader", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "showLogo", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hideMessageInput", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customCss", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumberId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "displayPhoneNumber", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callingEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "inboundCallsEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callHours", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "callRecordingEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "90", + "generated": null, + "identity": null, + "name": "callRecordingRetentionDays", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "callTranscriptionEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "whatsappCallRecordingMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'metaNative'", + "generated": null, + "identity": null, + "name": "callRecordingMode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "whatsappCallTranscriptionMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'metaNative'", + "generated": null, + "identity": null, + "name": "callTranscriptionMode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callAnnouncementLanguage", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callRecordingPurpose", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistAiReadsSyncedHistory", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isCoexist", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "platformType", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "historyDeclined", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiTestEventCode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "whatsappRegistrationStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending_verification'", + "generated": null, + "identity": null, + "name": "registrationStatus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "registrationError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verificationCodeRequestedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handoverResumeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "oaId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fallbackFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "syncTagEnabledAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "coverImageUrl", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startsAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endsAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "leaderboardStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'draft'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "leaderboardPlatform", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "platform", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minigameId", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rules", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "followersOnly", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagIds", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'22:00'", + "generated": null, + "identity": null, + "name": "resetTime", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "cooldownSeconds", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referralWelcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rewardSettings", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rewardsTriggeredAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rewardRecipients", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leaderboardId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "leaderboardAuditAction", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "delta", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorUserId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leaderboardId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "score", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isBanned", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referrerContactId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "scoredAt", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dailyBucket", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dailyCounts", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "breakdown", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastActivityAt", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leaderboardId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delta", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "leaderboardScoreSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rule", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceRef", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linkId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isFavourite", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastAccessedAt", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentAttributes", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "messageType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageType", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "contentType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentType", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "senderType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "messageKind", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'message'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attributes", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendError", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationIds", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sinceTime", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "MessageCleanupStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "messagingAdChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "messagingAdCreateState", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "createState", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "messagingAdPublishState", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'draft'", + "generated": null, + "identity": null, + "name": "publishState", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaCampaignId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaAdSetId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaAdCreativeId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaAdId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "input", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cleanupError", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "messagingAdChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'POSITIONAL'", + "generated": null, + "identity": null, + "name": "parameterFormat", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "components", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaFlowId", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'current'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventName", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentCategory", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentName", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'business_messaging'", + "generated": null, + "identity": null, + "name": "actionSource", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentType", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentIds", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceKey", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "capiStatus", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiSentAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiError", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMetaCatalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "metaCatalogItemDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'push'", + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retailerId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedFingerprint", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMetaCatalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "metaCatalogSyncStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'queued'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "metaCatalogItemDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'push'", + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "metaCatalogSyncScope", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'all'", + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "selectedProductIds", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "handles", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionLeaseId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "succeededCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "itemErrors", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "skippedItems", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "pollAttempt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "definition", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowJson", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "submissionsCount", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "miniAppId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "whatsappFlowId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "validationErrors", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publishedAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "miniAppId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "miniAppSubmissionSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "answers", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "miniAppId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inputName", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadToken", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileName", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "miniAppUploadStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "minigameType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "generalSettings", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appearance", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "playerSettings", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prizeSettings", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "winningMessageSettings", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nonWinningMessageSettings", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "playsCount", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "participantsCount", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "winnersCount", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sharesCount", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minigameId", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openedAt", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "played", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "remaining", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sharesCount", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referrerContactId", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minigameId", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isWinning", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prizeId", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prizeName", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCodeId", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "amount", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "variantId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendorId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "variantLabel", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "combination", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sku", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retailerId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendorName", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "unitPrice", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "quantity", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "stockTaken", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountPercent", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "taxPercent", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountTotal", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "taxTotal", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lineTotal", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "orderSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "orderStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "paymentMethod", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'cod'", + "generated": null, + "identity": null, + "name": "paymentMethod", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "paymentStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'unpaid'", + "generated": null, + "identity": null, + "name": "paymentStatus", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subtotal", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountTotal", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingTotal", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "serviceFeeTotal", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "taxTotal", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "couponDiscount", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "total", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCodeId", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCode", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerName", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerEmail", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerPhone", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "shippingType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingType", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingAddress", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "note", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rating", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ratingComment", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "acceptedAt", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippedAt", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "concludedAt", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelReason", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "orderStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromStatus", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "orderStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "toStatus", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "orderActorType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorType", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorUserId", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "note", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicConfig", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "livemode", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "usePlatformCredential", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isVerified", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verifiedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUsedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortDescription", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "longDescription", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "price", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "taxes", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "discount", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'USD'", + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productUrl", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sku", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "inventoryPolicy", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'dont_track'", + "generated": null, + "identity": null, + "name": "inventoryPolicy", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "inventoryQuantity", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowOutOfStockPurchase", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "images", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "tags", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendorId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subcategoryId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isSearchable", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowSpecialRequest", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isAddonOnly", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "maxSelections", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "addonProductIds", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isVisible", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "combination", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "price", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isEnabled", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "values", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionIdSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionTitleSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionTypeSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "labelSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pointsEarned", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "attemptCount", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "answeredAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enableScore", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enableRetryMessages", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enableCustomFieldMapping", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerFlowId", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionnaireId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "questionnaireQuestionType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "orderNo", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "point", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retryMessage", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "systemFieldKey", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "config", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionnaireId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "questionnaireSubmissionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'inProgress'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "totalPoints", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentQuestionId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentQuestionSentAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastAnsweredMessageId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linkId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "ReflinkType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'refLink'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "qrStyles", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "widgetAuthorizedDomains", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "widgetHiddenInboxIds", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetLogoFileId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetBrandName", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetBrandUrl", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetLogoBackgroundColor", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstResponseTargetSeconds", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextResponseTargetSeconds", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "25", + "generated": null, + "identity": null, + "name": "breachingThresholdPercent", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortcut", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "savedReplyId", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mediaLibraryFileId", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "subscribers", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "messages", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "runAtMs", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "bucket", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idempotencyKey", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockOwner", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "enrollmentId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "case when \"seenAt\" is null then false when \"deliveredAt\" is null then false else \"seenAt\" >= \"deliveredAt\" end", + "type": "stored" + }, + "identity": null, + "name": "isRead", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "order", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delayDays", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "delayMinutes", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delayUnit", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "specificDateTime", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "anytime", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendTimeStart", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendTimeEnd", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "'[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\",\"sunday\"]'", + "generated": null, + "identity": null, + "name": "sendDays", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "spreadsheetId", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "SystemFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelType", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalLabelId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chatId", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "telegramChatType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "telegramBotChatStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botStatus", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publisherName", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "youtubeVideoId", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "testLink", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "selection", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryCounts", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formatVersion", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shareToken", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "shareEnabled", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shareExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultPermissions", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "createInstallFolder", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "defaultAutoUpdate", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "installCount", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateName", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceWorkspaceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formatVersion", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "templateInstallationStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "warnings", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "warningCount", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "resourceCount", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installFolderId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoUpdate", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceUpdatedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installedBy", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installationId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "templateResourceCategory", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resourceKind", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resourceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceResourceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "wasExisting", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "actions", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webhookId", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "operator", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstEnteredAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "executedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalContacts", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successCount", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failureCount", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalExecutions", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "devicePlatform", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "platform", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastSeenAt", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "menus", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortDescription", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phone", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeAddress", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "discountPercent", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "minimumOrderValue", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openHoursId", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subcategoryId", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "executedAt", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webhookId", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credential", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "grantedScopes", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provisionedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "creditLineId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wacid", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attemptId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "whatsappCallDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "whatsappCallStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'ringing'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "whatsappCallOutcome", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outcome", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "durationSeconds", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "answeredByUserId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "initiatedByUserId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordingRequested", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordingFailureReason", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordingPath", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transcript", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transcribedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transcriptSegments", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiSummary", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiSummarizedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiSummaryProvider", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "whatsappCallPermissionResponse", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "response", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isPermanent", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "respondedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumberId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payloadHash", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parseFailedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "categories", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "validationErrors", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "completedCount", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "screens", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "components", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAccessToken", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "apiVersion", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "candidatePhoneNumberIds", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "claimedPhoneNumberIds", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "consumedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkingHours" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHours" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHours" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHours" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WorkingHours" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ranges", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "weekday", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startMinute", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endMinute", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultReply", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "defaultReplyFrequency", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'allTime'", + "generated": null, + "identity": null, + "name": "defaultReplyFrequency", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "targetCountry", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'en'", + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'UTC'", + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'#016DFF'", + "generated": null, + "identity": null, + "name": "brandColor", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "developmentMode", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "smartResponseDelaySeconds", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logo", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scheduledDeletionAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletionRequestedById", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletionRequestedAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purgeStartedAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "supportAccessUntil", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "capiLimitedDataUse", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "WorkspaceApiTokenPermission", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permission", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenHash", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenPrefix", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isDefault", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedToken", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "scopes", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "count", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceName", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerEmail", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletionRequestedById", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletionRequestedByEmail", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletionRequestedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scheduledDeletionAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purgedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "usageSnapshot", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "details", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macCount", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "workspaceMemberRole", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notificationChannels", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notificationTypes", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "onlineSince", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "isActive", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageShard_isActive_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageShard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "shardKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageShard_shardKey_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageShard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "startTime", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "endTime", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ShardTimeRange_time_lookup_idx", + "entityType": "indexes", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "shardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ShardTimeRange_shardId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspace_integration_source_sourceEventId_key", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"channel\" = 'whatsapp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_ws_whatsapp_source_sourceEventId_key", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"channel\" = 'messenger'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_ws_messenger_source_sourceEventId_key", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationInstagramId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"channel\" = 'instagram'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_ws_instagram_source_sourceEventId_key", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_adId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "enabled", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionRule_workspaceId_channel_enabled_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIAgent_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIAgent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_sourceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "chunkIndex", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_sourceId_chunkIndex_key", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "embedding", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "vector_cosine_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "hnsw", + "concurrently": false, + "name": "AIConversationEmbedding_embedding_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_lookup_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_lookup_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_workspaceId_sourceType_sourceKey_key", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "messageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_messageId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIEmbedding_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "aiFileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIEmbedding_aiFileId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIFile_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIFile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "status IN ('pending', 'running', 'cancelling')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_inbox_live_uq", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "revision", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_inbox_revision_uq", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_workspace_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "\"createdAt\" DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_inbox_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastHeartbeatAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('pending', 'running', 'cancelling')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_live_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "requestedByUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_requestedByUserId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "applyToAllRequestedByUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_applyToAllRequestedByUserId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "gotoFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_gotoFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsAgentResponseEvent_workspaceId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "aiProvider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_aiProvider_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "hasResponse", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "result", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_hasResponse_result_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBroadcastEvent_workspaceId_broadcastId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adminId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_adminId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsConversationEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "toAssignee", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsConversationEvent_workspaceId_toAssignee_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsFlowNodeEvent_workspaceId_flowId_analyticsId_nodeId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "buttonId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsFlowNodeEvent_workspaceId_flowId_analyticsId_nodeId_buttonId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adminId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_adminId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "senderType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_senderType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsSequenceEvent_workspaceId_sequenceId_stepId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_token_key", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_topicId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_workspaceId_topicId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"contactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"conversationId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"contactInboxId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "objectKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsManifestStatus_objectKey_key", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "startAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_workspaceId_startAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "startAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_calendarId_status_startAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_contactId_calendarId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "publicLinkSlug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_publicLinkSlug_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendarAvailability_calendarId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "timingValue", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "timingUnit", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendarReminder_dedupe_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "jobId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_jobId_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sendAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_status_sendAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "appointmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_appointmentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "messageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "messageCreatedAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_message_idx", + "entityType": "indexes", + "schema": "public", + "table": "Attachment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_workspaceId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Attachment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Attachment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "providerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "accountId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Account_providerId_accountId_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Account" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Invitation_code_key", + "entityType": "indexes", + "schema": "public", + "table": "Invitation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Session_token_key", + "entityType": "indexes", + "schema": "public", + "table": "Session" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "User_email_tenant_key", + "entityType": "indexes", + "schema": "public", + "table": "User" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "User_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "User" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomatedResponse_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lastTriggeredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomationThrottle_lastTriggeredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomationThrottle_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BotField_workspaceId_type_name_key", + "entityType": "indexes", + "schema": "public", + "table": "BotField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" IN ('scheduled', 'sending') AND \"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_workspaceId_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_channel_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "schedulesAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_schedulesAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"deletedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_deletedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "parentBroadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurrenceAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_parentBroadcastId_occurrenceAt_key", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrence_broadcastId_key", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrence_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"nextRunAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrence_due_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "recurrenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "localSlot", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurrenceAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_recurrenceId_localSlot_occurrenceAt_key", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "recurrenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurrenceAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_recurrenceId_occurrenceAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "childBroadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_childBroadcastId_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastTarget_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastTarget_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_workspaceId_contactId_key", + "entityType": "indexes", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lastActivityAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"abandonedNotifiedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_abandoned_scan_idx", + "entityType": "indexes", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "externalPostId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ChannelPost_workspaceId_channel_externalPostId_key", + "entityType": "indexes", + "schema": "public", + "table": "ChannelPost" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "COALESCE(\"publishedAt\", \"createdAt\") DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ChannelPost_workspaceId_sortAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "ChannelPost" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ChannelPost_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ChannelPost" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_workspace_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastHeartbeatAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('init', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "\"startedAt\" DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('succeeded', 'partial')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_resume_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "status = 'init' AND type = 'coexist'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_init_uq", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "type = 'contact_scan' AND status IN ('init', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_contact_scan_active_uq", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "type = 'contact_scan'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_contact_scan_due_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomation_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomation_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "commentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "replyChannel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_dedup_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_automation_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"replyChannel\" = 'private' AND \"deliveredAt\" IS NOT NULL AND \"seenAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_private_unseen_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'failed'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_failed_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "commentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_dedup_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_automation_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "postId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationReply_dedup_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationReply_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationReply_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_expiresAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "consumedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"consumedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_consumedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "stateNonceHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_stateNonceHash_key", + "entityType": "indexes", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "provider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_workspaceId_provider_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "provider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_provider_sourceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "broadcastSubscribedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_broadcast_subscribed_at", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_created_at", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_email", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "phoneNumber", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_phone_number", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "md5(btrim(regexp_replace(\"fullName\", '[ \\t\\n\\v\\f\\r]+', ' ', 'g')))", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_full_name_md5", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "firstName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_firstName_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lastName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_lastName_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_email_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumber", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_phoneNumber_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "activityType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "referenceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "parentReferenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "referenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactActivity_reference_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactActivity" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactCustomField_contactId_customFieldId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactCustomField_customFieldId_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceUserId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceUserId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceParentUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceParentUserId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceParentUserId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "profileSnapshotNextAttemptAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"profileSnapshotState\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_profileSnapshot_pending_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"threadControlState\" = 'standby' AND \"threadOwnerRole\" = 'ai_agent'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_id_ai_held_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastIncomingMessageAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_contactId_lastIncomingMessageAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastOutboundMessageAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_contactId_lastOutboundMessageAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "(\"referral\"->>'ctwaClid')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referral\"->>'ctwaClid' IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_referral_ctwaClid_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "(\"referral\"->>'adId')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referral\"->>'adId' IS NOT NULL AND \"referral\"->>'source' = 'ADS'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_referral_adId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "postId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInboxPost_workspaceId_postId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInboxPost" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "normalizedText", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "ContactKeywordMessage_text_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "normalizedText", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "text_pattern_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactKeywordMessage_text_prefix_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactNote_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactNote" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_on_broadcast_contact_id", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnBroadcast_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnBroadcast_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "isRead", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_on_broadcast_is_read", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"sent\" = false AND \"failedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnBroadcast_unsent_order_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_sequenceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_status_nextRunAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_workspaceId_status_nextRunAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_contactId_sequenceId_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_workspaceId_flowId_contactInboxId_stepId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "triggerAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_status_triggerAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "appointmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_appointmentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" NOT IN ('completed', 'failed', 'canceled') AND \"type\" = 'followUp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_followUp_active_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" NOT IN ('completed', 'failed', 'canceled') AND \"type\" = 'quickReplyFollowUp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_quickReplyFollowUp_active_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastDeliveredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"lastDeliveredAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactState_lastDeliveredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactState" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTag_tagId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactToTag" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTagChannel_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTagChannel_tagId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_dm_key", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "responseDueAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"responseDueAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_workspaceId_responseDueAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "aiContextLastMessageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_aiContextLastMessageId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastActivityAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_workspaceId_lastActivityAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_conversationId_userId_key", + "entityType": "indexes", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_code_key", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"issuedContactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_key", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_issuedContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "issuedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_issuedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "usedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_usedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_code_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "usedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_usedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_status_deletedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_expiresAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_name_idx", + "entityType": "indexes", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomField_workspaceId_type_name_key", + "entityType": "indexes", + "schema": "public", + "table": "CustomField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionConnection_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "DecisionConnection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionConnection_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "DecisionConnection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "DecisionProfile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "connectionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_connectionId_idx", + "entityType": "indexes", + "schema": "public", + "table": "DecisionProfile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "DecisionProfile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"globalRouterEnabled\" = true", + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_workspaceId_globalRouter_key", + "entityType": "indexes", + "schema": "public", + "table": "DecisionProfile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"code\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCode_workspaceId_code_key", + "entityType": "indexes", + "schema": "public", + "table": "DiscountCode" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCode_categoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "DiscountCode" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DynamicImage_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "DynamicImage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceOpenHours_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "openHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_openHoursId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "abandonedCartFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_abandonedCartFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "checkoutFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_checkoutFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderConfirmationFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_orderConfirmationFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EmailTopic_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EmailTopic_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AuditLog_workspaceId_createdAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"userId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AuditLog_workspaceId_userId_createdAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AuditLog_createdAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_tenantId_key", + "entityType": "indexes", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "domain", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_domain_key", + "entityType": "indexes", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "licenseId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "License_licenseId_key", + "entityType": "indexes", + "schema": "public", + "table": "License" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformAdmin_userId_key", + "entityType": "indexes", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "ownerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tenant_ownerId_key", + "entityType": "indexes", + "schema": "public", + "table": "Tenant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "position", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TenantHelpItem_tenantId_position_idx", + "entityType": "indexes", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channelsTornDownAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserQuota_channelsTornDownAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserQuota" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"channelsTornDownAt\" IS NULL AND \"planStatus\" = 'trial'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserQuota_due_expired_trial_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserQuota" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ErrorLog_workspaceId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ErrorLog_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ErrorLog_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "event", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ExternalWebhook_workspaceId_event_idx", + "entityType": "indexes", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "event", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "url", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ExternalWebhook_workspaceId_event_url_key", + "entityType": "indexes", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "pageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "formId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsAutomation_workspaceId_pageId_formId_key", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "leadgenId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_automationId_leadgenId_key", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leadgenId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_leadgenId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"contactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookMarketingMessage_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "campaignId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookMarketingMessage_campaignId_key", + "entityType": "indexes", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookMarketingMessagesAuth_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "path", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_path_key", + "entityType": "indexes", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contextType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_workspaceId_contextType_idx", + "entityType": "indexes", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "subType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_workspaceId_subType_idx", + "entityType": "indexes", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Flow_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Flow" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowAnalyticsSession_workspaceId_flowId_key", + "entityType": "indexes", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowAnalyticsSession_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "buttonId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowNodeStat_filter_1_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"eventType\" = 'seen' AND \"seenAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowNodeStat_filter_2_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowRun_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowRun_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowRun_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowVersionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowRun_flowVersionId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowVersion_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowVersion" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowVersion_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowVersion" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Folder_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Folder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Folder_parentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Folder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "transactionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_workspaceId_transactionId_key", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_workspaceId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextProcessingCheckAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_status_nextProcessingCheckAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "claimedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_status_claimedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsSettings_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_workspaceId_type_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_inboxId_type_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "fileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_fileId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"type\" = 'products' AND \"status\" IN ('pending', 'processing')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_products_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhook_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhook_token_key", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboundWebhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "idempotencyKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"idempotencyKey\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_inboundWebhookId_idempotencyKey_key", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboundWebhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_inboundWebhookId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'received'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_createdAt_received_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "claimedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'processing'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_claimedAt_processing_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Inbox_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Inbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Inbox_workspaceId_channel_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "Inbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboxTeam_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboxTeam" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationActiveCampaign_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationActiveCampaign_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationApi_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationApi" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationApi_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationApi" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tokenHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationApi_tokenHash_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationApi" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Integration_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Integration" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Integration_workspaceId_integrationType_key", + "entityType": "indexes", + "schema": "public", + "table": "Integration" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationClaude_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationClaude_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDeepseek_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDeepseek_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDrip_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDrip_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationFacebookAds_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationFacebookAds_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGemini_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGemini_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGetResponse_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGetResponse_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleAds_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleAds_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleCalendar_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleSheet_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_welcomeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "igId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_igId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationKlaviyo_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationKlaviyo_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailchimp_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailchimp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailerLite_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailerLite_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_welcomeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "handoverResumeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_handoverResumeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "pageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_pageId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_deletedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMoosend_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMoosend_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenAI_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenAI_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "preset", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"preset\" <> 'custom'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_workspaceId_preset_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenrouter_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenrouter_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOutlookCalendar_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSendGrid_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSendGrid_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSmtp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSmtp_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "botId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_botId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationThreads_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationThreads_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "threadsUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationThreads_threadsUserId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "openId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_openId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_welcomeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "handoverResumeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_handoverResumeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_phoneNumberId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "fallbackFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_fallbackFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "oaId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_oaId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Leaderboard_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Leaderboard_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Leaderboard_minigameId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardAuditLog_leaderboardId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardAuditLog_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "score", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "scoredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "NOT \"isBanned\"", + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_ranking_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "referrerContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_leaderboardId_referrerContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "referrerContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referrerContactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_referrerContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardScoreEvent_leaderboardId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardScoreEvent_leaderboardId_contactId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardScoreEvent_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLink_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "MagicLink" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLink_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MagicLink" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "linkId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLinkStat_workspaceId_linkId_occurredAt_contactInboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MediaLibraryFile_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MediaLibraryFile_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MediaLibraryFolder_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_conversation_history_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_workspace_created_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_contactInboxId_sourceId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_conversationId_type_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"parentId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_parentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_inboxId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessageCleanup" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_status_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageCleanup" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageCleanup" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_integrationWhatsappId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_integrationMessengerId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationInstagramId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_integrationInstagramId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_integrationWhatsappId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_integrationMessengerId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationInstagramId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_integrationInstagramId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerMessageTemplate_integrationMessengerId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerWelcomeMessageFlow_workspaceId_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerWelcomeMessageFlow_integrationMessengerId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" = 'current'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerWelcomeMessageFlow_current_key", + "entityType": "indexes", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_workspaceId_channel_sourceKey_key", + "entityType": "indexes", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_channel_integrationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMetaCatalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "catalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "retailerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_integration_retailer_key", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMetaCatalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "catalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_integration_product_key", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" IN ('queued', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogSyncRun_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniApp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MiniApp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniApp_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "MiniApp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "miniAppId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppPublication_miniAppId_integrationWhatsappId_key", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "miniAppId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppSubmission_miniAppId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppSubmission_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "uploadToken", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_uploadToken_key", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "path", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_path_key", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "miniAppId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "inputName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_miniAppId_inputName_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "submissionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_submissionId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"contactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Minigame_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Minigame" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Minigame_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Minigame" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_minigameId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_minigameId_contactId_key", + "entityType": "indexes", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "referrerContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referrerContactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_referrerContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"contactInboxId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigamePlay_minigameId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MinigamePlay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigamePlay_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MinigamePlay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCodeRedemption_orderId_key", + "entityType": "indexes", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "discountCodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCodeRedemption_discountCodeId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCodeRedemption_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_orderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_workspaceId_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "vendorId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_workspaceId_vendorId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "variantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_variantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_categoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "number", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_workspaceId_number_key", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_workspaceId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "discountCodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_discountCodeId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderStatusHistory_orderId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderStatusHistory_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "actorUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderStatusHistory_actorUserId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "livemode", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"userId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_user_type_livemode_key", + "entityType": "indexes", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "livemode", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"userId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_platform_type_livemode_key", + "entityType": "indexes", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_userId_idx", + "entityType": "indexes", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_categoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "subcategoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_subcategoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "vendorId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_vendorId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductAddon_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductAddon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductCategory_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductCategory_parentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductVariant_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductVariant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductVariantOption_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "submissionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "questionIdSnapshot", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireAnswer_submissionId_questionIdSnapshot_key", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireAnswer_questionId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Questionnaire_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Questionnaire_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "orderNo", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireQuestion_questionnaireId_orderNo_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireQuestion_customFieldId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_questionnaireId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_questionnaireId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"conversationId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "currentQuestionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"currentQuestionId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_currentQuestionId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" = 'inProgress'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_workspaceId_contactId_active_key", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "RefLinkStat_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "linkId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "RefLinkStat_workspaceId_linkId_occurredAt_contactInboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Reflink_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReply_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SavedReply" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "savedReplyId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_savedReplyId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "mediaLibraryFileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_mediaLibraryFileId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "savedReplyId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "mediaLibraryFileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_savedReplyId_mediaLibraryFileId_key", + "entityType": "indexes", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Sequence_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Sequence_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "idempotencyKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_idempotencyKey_key", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_pending_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "bucket", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_pending_bucket_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_status_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_workspaceId_status_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "enrollmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_enrollmentId_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_workspace_sequence_step_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "bucket", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_bucket_status_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "updatedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" in ('completed', 'failed', 'canceled')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_terminal_updatedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_sequenceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_stepId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceStep_sequenceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceStep_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "spreadsheetId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_workspaceId_spreadsheetId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "spreadsheetId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_spreadsheetId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tag_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tag_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_tag_integration_key", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "externalLabelId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_external_key", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_workspace_channel_idx", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_integration_idx", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "chatId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TelegramChat_inboxId_chatId_key", + "entityType": "indexes", + "schema": "public", + "table": "TelegramChat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TelegramChat_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TelegramChat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "shareToken", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_shareToken_key", + "entityType": "indexes", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "templateId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_templateId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "installationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstalledResource_installationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "resourceKind", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "resourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstalledResource_workspaceId_resourceKind_resourceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "active", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_source_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_triggerId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_webhookId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_sourceId_triggerId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_sourceId_webhookId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_triggerId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_triggerId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_triggerId_date_key", + "entityType": "indexes", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_triggerId_date_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_workspaceId_date_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserDeviceToken_userId_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserPersistentMenu_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "openHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_openHoursId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_categoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "subcategoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_subcategoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "active", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_workspaceId_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_webhookId_contactId_key", + "entityType": "indexes", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "wabaId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappBusinessAccount_workspaceId_wabaId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "wacid", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"wacid\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_wacid_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "attemptId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"attemptId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_attemptId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_workspaceId_createdAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_contactInboxId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'ringing'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_ringing_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'ringing' AND \"wacid\" IS NOT NULL AND \"answeredByUserId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_resumableRinging_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "recordedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"recordingPath\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_recording_inboxId_recordedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"direction\" = 'businessInitiated' AND \"status\" IN ('ringing', 'accepted')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_pendingOutbound_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCallPermission_contactInboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCallPermission_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_phoneNumberId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "payloadHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_phone_hash_uq", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "processedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"processedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_processedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "parseFailedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"parseFailedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_parseFailedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappFlow_integrationWhatsappId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappMessageTemplate_integrationWhatsappId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappSignupSession_userId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappSignupSession_expiresAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHours_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkingHours" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"workingHoursId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursDateOverride_workspace_date_key", + "entityType": "indexes", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workingHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"workingHoursId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursDateOverride_schedule_date_key", + "entityType": "indexes", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursDateOverride_workspaceId_date_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workingHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursInterval_workingHoursId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workingHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursMember_workingHoursId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "scheduledDeletionAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_scheduledDeletionAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "supportAccessUntil", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_supportAccessUntil_idx", + "entityType": "indexes", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceApiToken_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"isDefault\"", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceApiToken_workspaceId_default_key", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "ownerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "periodStart", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceBotMessageUsage_ownerId_periodStart_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "periodStart", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceBotMessageUsage_tenantId_periodStart_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "ownerEmail", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceDeletionRecord_ownerEmail_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "ownerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "periodStart", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceMac_ownerId_periodStart_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "periodStart", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceMac_tenantId_periodStart_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceMember_workspaceId_userId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "nameExplicit": false, + "columns": [ + "shardId" + ], + "schemaTo": "public", + "tableTo": "MessageShard", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ShardTimeRange_shardId_MessageShard_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_IENNsXLBb1k1_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_yeTDEtvJMs4H_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_1X1qUqZpm24x_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AdsConversionEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_k99JXbMObQIn_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": [ + "integrationFacebookAdsId" + ], + "schemaTo": "public", + "tableTo": "IntegrationFacebookAds", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_fBmu8W26Mw5R_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_3zzAptVRRuZD_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_HUibBtSUZbML_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIAgent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIAgent" + }, + { + "nameExplicit": false, + "columns": [ + "sourceId" + ], + "schemaTo": "public", + "tableTo": "AIConversationSource", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_sourceId_AIConversationSource_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationSource_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationSource_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIEmbedding_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": false, + "columns": [ + "aiFileId" + ], + "schemaTo": "public", + "tableTo": "AIFile", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIEmbedding_aiFileId_AIFile_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIFile_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIFile" + }, + { + "nameExplicit": false, + "columns": [ + "triggerFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIFunction_triggerFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIFunction" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIFunction_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIFunction" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverBulkRun_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverBulkRun_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": false, + "columns": [ + "requestedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIHandoverBulkRun_requestedByUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverSettings_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverSettings_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": false, + "columns": [ + "gotoFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIHandoverSettings_gotoFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": false, + "columns": [ + "applyToAllRequestedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIHandoverSettings_applyToAllRequestedByUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIMCPServer_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIMCPServer" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsAgentResponseEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsBotMessageEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsBroadcastEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsContactEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsConversationEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsFlowNodeEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsMessageEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsSequenceEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "nameExplicit": false, + "columns": [ + "topicId" + ], + "schemaTo": "public", + "tableTo": "EmailTopic", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_topicId_EmailTopic_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AnalyticsEmailTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Appointment_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": [ + "calendarId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Appointment_calendarId_AppointmentCalendar_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Appointment_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Appointment_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Appointment_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "confirmationFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_confirmationFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "cancellationFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_cancellationFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "externalConnectionId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_externalConnectionId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "calendarId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarAvailability_QfahoIQAX592_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "nameExplicit": false, + "columns": [ + "calendarId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarReminder_5O4INfYC3dY3_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarReminder_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "appointmentId" + ], + "schemaTo": "public", + "tableTo": "Appointment", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_appointmentId_Appointment_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "reminderConfigId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendarReminder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_a526jJM55OD7_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentReminderDispatch_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Account_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Account" + }, + { + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Account_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Account" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Invitation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Invitation" + }, + { + "nameExplicit": false, + "columns": [ + "invitedBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Invitation_invitedBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Invitation" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Session_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Session" + }, + { + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "User_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "User" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomatedResponse_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AutomatedResponse_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AutomatedResponse_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomationThrottle_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomationThrottle_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BotField_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BotField" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BotField_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BotField" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Broadcast_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Broadcast_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_integrationWhatsappId_IntegrationWhatsapp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_integrationMessengerId_IntegrationMessenger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": [ + "parentBroadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_parentBroadcastId_Broadcast_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrence_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "nameExplicit": false, + "columns": [ + "broadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrence_broadcastId_Broadcast_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrenceOccurrence_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": false, + "columns": [ + "recurrenceId" + ], + "schemaTo": "public", + "tableTo": "BroadcastRecurrence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrenceOccurrence_x0yNXfzZ2cZs_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": false, + "columns": [ + "childBroadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BroadcastRecurrenceOccurrence_Md67cxyTrOQZ_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": false, + "columns": [ + "broadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastTarget_broadcastId_Broadcast_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastTarget_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BroadcastTarget_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Cart_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Cart_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Cart_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ChannelPost_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ChannelPost" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ChannelPost_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ChannelPost" + }, + { + "nameExplicit": false, + "columns": [ + "requestedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CoexistSyncRun_requestedByUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomation_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomation_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "CommentAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationEvent_automationId_CommentAutomation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationEvent_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationMiss_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "CommentAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationMiss_automationId_CommentAutomation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationMiss_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationMiss_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "CommentAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "CommentAutomationReply_automationId_CommentAutomation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "CommentAutomationReply_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "CommentAutomationReply_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConnectSession_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": false, + "columns": [ + "targetConnectionId" + ], + "schemaTo": "public", + "tableTo": "Connection", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConnectSession_targetConnectionId_Connection_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": false, + "columns": [ + "actorUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ConnectSession_actorUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": false, + "columns": [ + "actorTokenId" + ], + "schemaTo": "public", + "tableTo": "WorkspaceApiToken", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ConnectSession_actorTokenId_WorkspaceApiToken_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Connection_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Connection_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Connection_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": false, + "columns": [ + "createdBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Connection_createdBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Contact_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactCustomField_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactCustomField_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactInbox_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactInbox_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactNote_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactNote" + }, + { + "nameExplicit": false, + "columns": [ + "createdById" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactNote_createdById_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactNote" + }, + { + "nameExplicit": false, + "columns": [ + "broadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_broadcastId_Broadcast_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": false, + "columns": [ + "sequenceId" + ], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_sequenceId_Sequence_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSmartDelay_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": false, + "columns": [ + "appointmentId" + ], + "schemaTo": "public", + "tableTo": "Appointment", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ContactOnSmartDelay_appointmentId_Appointment_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSmartDelay_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTag_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTag" + }, + { + "nameExplicit": false, + "columns": [ + "tagId" + ], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTag_tagId_Tag_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTag" + }, + { + "nameExplicit": false, + "columns": [ + "tagId" + ], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_tagId_Tag_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": false, + "columns": [ + "tagChannelId" + ], + "schemaTo": "public", + "tableTo": "TagChannel", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_tagChannelId_TagChannel_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": false, + "columns": [ + "assignedUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Conversation_assignedUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": [ + "assignedInboxTeamId" + ], + "schemaTo": "public", + "tableTo": "InboxTeam", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Conversation_assignedInboxTeamId_InboxTeam_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Conversation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Conversation_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Coupon_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": false, + "columns": [ + "topicId" + ], + "schemaTo": "public", + "tableTo": "CouponTopic", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Coupon_topicId_CouponTopic_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": false, + "columns": [ + "issuedContactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Coupon_issuedContactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CouponTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": false, + "columns": [ + "createdById" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CouponTopic_createdById_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CustomField_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CustomField" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CustomField_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CustomField" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DecisionConnection_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DecisionConnection" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DecisionProfile_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DecisionProfile" + }, + { + "nameExplicit": false, + "columns": [ + "connectionId" + ], + "schemaTo": "public", + "tableTo": "DecisionConnection", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "DecisionProfile_connectionId_DecisionConnection_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DecisionProfile" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCode_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DiscountCode" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "DiscountCode_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DiscountCode" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DynamicImage_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DynamicImage" + }, + { + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "DynamicImage_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DynamicImage" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EcommerceOpenHours_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EcommerceOrderCounter_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceOrderCounter" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EcommerceSettings_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": false, + "columns": [ + "openHoursId" + ], + "schemaTo": "public", + "tableTo": "EcommerceOpenHours", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_openHoursId_EcommerceOpenHours_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": false, + "columns": [ + "abandonedCartFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_abandonedCartFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": false, + "columns": [ + "checkoutFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_checkoutFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": false, + "columns": [ + "orderConfirmationFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_orderConfirmationFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EmailTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EmailTopic_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AuditLog_workspaceId_fkey", + "entityType": "fks", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": true, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AuditLog_userId_fkey", + "entityType": "fks", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CustomDomain_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "PlatformAdmin_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Tenant_ownerId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Tenant" + }, + { + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TenantHelpItem_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "UserQuota_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "UserQuota" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "WorkspaceUsage_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ErrorLog_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ErrorLog_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ExternalWebhook_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookLeadAdsAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "FacebookLeadAdsAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookLeadAdsLead_n8swD949nr3L_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "FacebookLeadAdsLead_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookMarketingMessage_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookMarketingMessagesAuth_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "File_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "File_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Flow_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Flow" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Flow_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Flow" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowNodeStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": [ + "flowVersionId" + ], + "schemaTo": "public", + "tableTo": "FlowVersion", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_flowVersionId_FlowVersion_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowVersion_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowVersion" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowVersion_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowVersion" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Folder_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Folder" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "GoogleAdsConversionEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "integrationGoogleAdsId" + ], + "schemaTo": "public", + "tableTo": "IntegrationGoogleAds", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "GoogleAdsConversionEvent_Ju5oh0fVmaLy_fkey", + "entityType": "fks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "GoogleAdsConversionEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "GoogleAdsSettings_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IgStoryAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IgStoryAutomation_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IgStoryAutomation_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Import_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Import_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Import_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": [ + "fileId" + ], + "schemaTo": "public", + "tableTo": "File", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Import_fileId_File_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboundWebhook_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboundWebhook" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboundWebhookRequest_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": false, + "columns": [ + "inboundWebhookId" + ], + "schemaTo": "public", + "tableTo": "InboundWebhook", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboundWebhookRequest_inboundWebhookId_InboundWebhook_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "InboundWebhookRequest_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "InboundWebhookRequest_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Inbox_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Inbox" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxContactStat_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxContactStat" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeam_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxTeam" + }, + { + "nameExplicit": false, + "columns": [ + "inboxTeamId" + ], + "schemaTo": "public", + "tableTo": "InboxTeam", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeamMember_inboxTeamId_InboxTeam_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeamMember_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationActiveCampaign_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationActiveCampaign_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationApi_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationApi" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationApi_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationApi" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Integration_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Integration" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationClaude_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationClaude_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDeepseek_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDeepseek_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDrip_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDrip_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationFacebookAds_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationFacebookAds_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGemini_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGemini_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGetResponse_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGetResponse_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleAds_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleAds_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleCalendar_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleSheet_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleSheet_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationInstagram_workspaceId_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationInstagram_inboxId_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + "welcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationInstagram_welcomeFlowId_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationKlaviyo_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationKlaviyo_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailchimp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailchimp_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailerLite_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailerLite_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMessenger_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMessenger_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": [ + "welcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationMessenger_welcomeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": [ + "handoverResumeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationMessenger_handoverResumeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMetaCatalog_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMetaCatalog_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMoosend_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMoosend_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenai_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenai_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": [ + "aiAgentId" + ], + "schemaTo": "public", + "tableTo": "AIAgent", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationOpenai_aiAgentId_AIAgent_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenaiCompatible_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenaiCompatible_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenrouter_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenrouter_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOutlookCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOutlookCalendar_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSendGrid_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSendGrid_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSmtp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSmtp_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTelegram_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTelegram_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationThreads_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationThreads_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTiktok_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTiktok_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWebchat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWebchat_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": false, + "columns": [ + "welcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationWebchat_welcomeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": false, + "columns": [ + "handoverResumeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationWhatsapp_handoverResumeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWhatsapp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWhatsapp_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationZalo_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationZalo_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": false, + "columns": [ + "fallbackFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationZalo_fallbackFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Leaderboard_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Leaderboard_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": false, + "columns": [ + "minigameId" + ], + "schemaTo": "public", + "tableTo": "Minigame", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Leaderboard_minigameId_Minigame_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": false, + "columns": [ + "referralWelcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Leaderboard_referralWelcomeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": false, + "columns": [ + "leaderboardId" + ], + "schemaTo": "public", + "tableTo": "Leaderboard", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardAuditLog_leaderboardId_Leaderboard_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardAuditLog_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "LeaderboardAuditLog_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "nameExplicit": false, + "columns": [ + "actorUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "LeaderboardAuditLog_actorUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "nameExplicit": false, + "columns": [ + "leaderboardId" + ], + "schemaTo": "public", + "tableTo": "Leaderboard", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardParticipant_leaderboardId_Leaderboard_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardParticipant_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardParticipant_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "referrerContactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "LeaderboardParticipant_referrerContactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLink_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MagicLink" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLinkStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "nameExplicit": false, + "columns": [ + "linkId" + ], + "schemaTo": "public", + "tableTo": "MagicLink", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLinkStat_linkId_MagicLink_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MediaLibraryFile_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "MediaLibraryFolder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MediaLibraryFile_folderId_MediaLibraryFolder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MediaLibraryFolder_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_D2X0VlACjh0B_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_DlCmuyYqclNt_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_LwL2ykeZegup_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": false, + "columns": [ + "createdBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MessagingAdOperation_createdBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_Q2FrBLiP3QqD_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_tLZC78O5pMBb_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_4ubezEjd9jQX_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerMessageTemplate_x0Vv1d8cvLYN_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerWelcomeMessageFlow_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerWelcomeMessageFlow_OSpsF41G77zr_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCapiEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCapiEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMetaCatalogId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMetaCatalog", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogItem_wJXyKUssR08y_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogItem_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogSyncRun_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMetaCatalogId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMetaCatalog", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogSyncRun_8PnmCJ0uISUd_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MetaCatalogSyncRun_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniApp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniApp" + }, + { + "nameExplicit": false, + "columns": [ + "miniAppId" + ], + "schemaTo": "public", + "tableTo": "MiniApp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppPublication_miniAppId_MiniApp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppPublication_oBb1VPqI8uvn_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "nameExplicit": false, + "columns": [ + "whatsappFlowId" + ], + "schemaTo": "public", + "tableTo": "WhatsappFlow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MiniAppPublication_whatsappFlowId_WhatsappFlow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppSubmission_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "miniAppId" + ], + "schemaTo": "public", + "tableTo": "MiniApp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppSubmission_miniAppId_MiniApp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MiniAppSubmission_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppUpload_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": false, + "columns": [ + "miniAppId" + ], + "schemaTo": "public", + "tableTo": "MiniApp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppUpload_miniAppId_MiniApp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppUpload_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": false, + "columns": [ + "submissionId" + ], + "schemaTo": "public", + "tableTo": "MiniAppSubmission", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MiniAppUpload_submissionId_MiniAppSubmission_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Minigame_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Minigame" + }, + { + "nameExplicit": false, + "columns": [ + "minigameId" + ], + "schemaTo": "public", + "tableTo": "Minigame", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigameContact_minigameId_Minigame_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigameContact_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": false, + "columns": [ + "referrerContactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MinigameContact_referrerContactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MinigameContact_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": false, + "columns": [ + "minigameId" + ], + "schemaTo": "public", + "tableTo": "Minigame", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigamePlay_minigameId_Minigame_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MinigamePlay" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigamePlay_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MinigamePlay" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCodeRedemption_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": false, + "columns": [ + "discountCodeId" + ], + "schemaTo": "public", + "tableTo": "DiscountCode", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCodeRedemption_discountCodeId_DiscountCode_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": false, + "columns": [ + "orderId" + ], + "schemaTo": "public", + "tableTo": "Order", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCodeRedemption_orderId_Order_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "DiscountCodeRedemption_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": false, + "columns": [ + "orderId" + ], + "schemaTo": "public", + "tableTo": "Order", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderItem_orderId_Order_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderItem_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": false, + "columns": [ + "variantId" + ], + "schemaTo": "public", + "tableTo": "ProductVariant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_variantId_ProductVariant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": false, + "columns": [ + "vendorId" + ], + "schemaTo": "public", + "tableTo": "Vendor", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_vendorId_Vendor_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Order_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": false, + "columns": [ + "discountCodeId" + ], + "schemaTo": "public", + "tableTo": "DiscountCode", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_discountCodeId_DiscountCode_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": false, + "columns": [ + "orderId" + ], + "schemaTo": "public", + "tableTo": "Order", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderStatusHistory_orderId_Order_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderStatusHistory_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "nameExplicit": false, + "columns": [ + "actorUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderStatusHistory_actorUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Credential_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": false, + "columns": [ + "vendorId" + ], + "schemaTo": "public", + "tableTo": "Vendor", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_vendorId_Vendor_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": [ + "subcategoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_subcategoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Product_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductAddon_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductAddon" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductCategory_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": false, + "columns": [ + "parentId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductCategory_parentId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductVariant_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductVariant" + }, + { + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductVariantOption_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "nameExplicit": false, + "columns": [ + "submissionId" + ], + "schemaTo": "public", + "tableTo": "QuestionnaireSubmission", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireAnswer_l8clOEM7NsPl_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": false, + "columns": [ + "questionId" + ], + "schemaTo": "public", + "tableTo": "QuestionnaireQuestion", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireAnswer_questionId_QuestionnaireQuestion_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": false, + "columns": [ + "triggerFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Questionnaire_triggerFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Questionnaire_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": false, + "columns": [ + "questionnaireId" + ], + "schemaTo": "public", + "tableTo": "Questionnaire", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireQuestion_questionnaireId_Questionnaire_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireQuestion_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "questionnaireId" + ], + "schemaTo": "public", + "tableTo": "Questionnaire", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_questionnaireId_Questionnaire_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireSubmission_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "currentQuestionId" + ], + "schemaTo": "public", + "tableTo": "QuestionnaireQuestion", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireSubmission_mha0bYFxcV7A_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "RefLinkStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": false, + "columns": [ + "linkId" + ], + "schemaTo": "public", + "tableTo": "Reflink", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "RefLinkStat_linkId_Reflink_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Reflink_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Reflink_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Reflink_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": [ + "widgetLogoFileId" + ], + "schemaTo": "public", + "tableTo": "MediaLibraryFile", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Reflink_widgetLogoFileId_MediaLibraryFile_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ResponseSlaPolicy_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReply_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SavedReply" + }, + { + "nameExplicit": false, + "columns": [ + "savedReplyId" + ], + "schemaTo": "public", + "tableTo": "SavedReply", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReplyImage_savedReplyId_SavedReply_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": false, + "columns": [ + "mediaLibraryFileId" + ], + "schemaTo": "public", + "tableTo": "MediaLibraryFile", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReplyImage_mediaLibraryFileId_MediaLibraryFile_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReplyImage_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Sequence_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Sequence_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "sequenceId" + ], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_sequenceId_Sequence_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "stepId" + ], + "schemaTo": "public", + "tableTo": "SequenceStep", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_stepId_SequenceStep_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + "enrollmentId", + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "ContactOnSequence", + "columnsTo": [ + "id", + "workspaceId" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_enrollment_workspace_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "SequenceStep_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": false, + "columns": [ + "sequenceId" + ], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceStep_sequenceId_Sequence_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Spreadsheet_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Tag_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Tag_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TagChannel_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": false, + "columns": [ + "tagId" + ], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TagChannel_tagId_Tag_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TelegramChat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TelegramChat" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TelegramChat_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TelegramChat" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Template_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Template_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": false, + "columns": [ + "createdBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Template_createdBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstallation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": [ + "templateId" + ], + "schemaTo": "public", + "tableTo": "Template", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_templateId_Template_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": [ + "installFolderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_installFolderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": [ + "installedBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_installedBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": [ + "installationId" + ], + "schemaTo": "public", + "tableTo": "TemplateInstallation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstalledResource_a0BqwWeO96EB_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstalledResource_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Trigger_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Trigger_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Condition_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": false, + "columns": [ + "webhookId" + ], + "schemaTo": "public", + "tableTo": "Webhook", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Condition_webhookId_Webhook_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerStat_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserDeviceToken_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserDeviceToken_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserPersistentMenu_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Vendor_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": false, + "columns": [ + "openHoursId" + ], + "schemaTo": "public", + "tableTo": "EcommerceOpenHours", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Vendor_openHoursId_EcommerceOpenHours_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Vendor_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": false, + "columns": [ + "subcategoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Vendor_subcategoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Webhook_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Webhook_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": false, + "columns": [ + "webhookId" + ], + "schemaTo": "public", + "tableTo": "Webhook", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_webhookId_Webhook_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappBusinessAccount_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "nameExplicit": false, + "columns": [ + "answeredByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "WhatsappCall_answeredByUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": false, + "columns": [ + "initiatedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "WhatsappCall_initiatedByUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCallPermission_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCallPermission_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappFlow_integrationWhatsappId_IntegrationWhatsapp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappMessageTemplate_p6pSomUTTJCm_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_ownerId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHours_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHours" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursDateOverride_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "nameExplicit": true, + "columns": [ + "workingHoursId", + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "WorkingHours", + "columnsTo": [ + "id", + "workspaceId" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursDateOverride_workingHoursId_workspaceId_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "nameExplicit": false, + "columns": [ + "workingHoursId" + ], + "schemaTo": "public", + "tableTo": "WorkingHours", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursInterval_workingHoursId_WorkingHours_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursMember_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursMember_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "nameExplicit": true, + "columns": [ + "workingHoursId", + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "WorkingHours", + "columnsTo": [ + "id", + "workspaceId" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursMember_workingHoursId_workspaceId_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Workspace_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Workspace_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceApiToken_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceBotMessageUsage_ownerId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMac_ownerId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMember_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMember_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsAgentResponseEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsBotMessageEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "columns": [ + "broadcastId", + "contactInboxId", + "batchId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsBroadcastEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsContactEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsConversationEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "columns": [ + "flowId", + "analyticsId", + "nodeId", + "buttonId", + "contactInboxId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsFlowNodeEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsMessageEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "columns": [ + "sequenceId", + "stepId", + "contactInboxId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsSequenceEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "columns": [ + "id", + "createdAt" + ], + "nameExplicit": false, + "name": "Attachment_pkey", + "entityType": "pks", + "schema": "public", + "table": "Attachment" + }, + { + "columns": [ + "workspaceId", + "contactInboxId", + "throttleType", + "subjectId" + ], + "nameExplicit": true, + "name": "AutomationThrottle_pkey", + "entityType": "pks", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "columns": [ + "broadcastId", + "inboxId" + ], + "nameExplicit": true, + "name": "BroadcastTarget_pkey", + "entityType": "pks", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "columns": [ + "workspaceId", + "hourBucket", + "contactInboxId" + ], + "nameExplicit": false, + "name": "ContactActiveHourly_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "columns": [ + "workspaceId", + "periodStart", + "contactInboxId" + ], + "nameExplicit": false, + "name": "ContactActiveMonthly_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "columns": [ + "workspaceId", + "contactId", + "activityType", + "referenceType", + "parentReferenceId", + "referenceId" + ], + "nameExplicit": true, + "name": "ContactActivity_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactActivity" + }, + { + "columns": [ + "workspaceId", + "contactInboxId", + "postId" + ], + "nameExplicit": true, + "name": "ContactInboxPost_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactInboxPost" + }, + { + "columns": [ + "workspaceId", + "contactId", + "messageId" + ], + "nameExplicit": true, + "name": "ContactKeywordMessage_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "columns": [ + "broadcastId", + "contactId" + ], + "nameExplicit": true, + "name": "ContactsOnBroadcast_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "columns": [ + "id", + "workspaceId" + ], + "nameExplicit": true, + "name": "ContactOnSequence_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "columns": [ + "workspaceId", + "contactId" + ], + "nameExplicit": true, + "name": "ContactState_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactState" + }, + { + "columns": [ + "contactId", + "tagId" + ], + "nameExplicit": false, + "name": "ContactToTag_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactToTag" + }, + { + "columns": [ + "tagChannelId", + "contactInboxId" + ], + "nameExplicit": false, + "name": "ContactToTagChannel_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "columns": [ + "leaderboardId", + "contactId" + ], + "nameExplicit": false, + "name": "LeaderboardParticipant_pkey", + "entityType": "pks", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "columns": [ + "createdAt", + "id" + ], + "nameExplicit": false, + "name": "LeaderboardScoreEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "columns": [ + "id", + "createdAt" + ], + "nameExplicit": false, + "name": "Message_pkey", + "entityType": "pks", + "schema": "public", + "table": "Message" + }, + { + "columns": [ + "id", + "workspaceId" + ], + "nameExplicit": true, + "name": "SequenceDispatch_pkey", + "entityType": "pks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "columns": [ + "id", + "contactId" + ], + "nameExplicit": true, + "name": "TriggerContactHistory_pkey", + "entityType": "pks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessageShard_pkey", + "schema": "public", + "table": "MessageShard", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ShardTimeRange_pkey", + "schema": "public", + "table": "ShardTimeRange", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AdsConversionEvent_pkey", + "schema": "public", + "table": "AdsConversionEvent", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AdsConversionRule_pkey", + "schema": "public", + "table": "AdsConversionRule", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIAgent_pkey", + "schema": "public", + "table": "AIAgent", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIConversationEmbedding_pkey", + "schema": "public", + "table": "AIConversationEmbedding", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIConversationSource_pkey", + "schema": "public", + "table": "AIConversationSource", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIEmbedding_pkey", + "schema": "public", + "table": "AIEmbedding", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIFile_pkey", + "schema": "public", + "table": "AIFile", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIFunction_pkey", + "schema": "public", + "table": "AIFunction", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIHandoverBulkRun_pkey", + "schema": "public", + "table": "AIHandoverBulkRun", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIHandoverSettings_pkey", + "schema": "public", + "table": "AIHandoverSettings", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIMCPServer_pkey", + "schema": "public", + "table": "AIMCPServer", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AnalyticsEmailTopic_pkey", + "schema": "public", + "table": "AnalyticsEmailTopic", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Appointment_pkey", + "schema": "public", + "table": "Appointment", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentCalendar_pkey", + "schema": "public", + "table": "AppointmentCalendar", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentCalendarAvailability_pkey", + "schema": "public", + "table": "AppointmentCalendarAvailability", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentCalendarReminder_pkey", + "schema": "public", + "table": "AppointmentCalendarReminder", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentReminderDispatch_pkey", + "schema": "public", + "table": "AppointmentReminderDispatch", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Account_pkey", + "schema": "public", + "table": "Account", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Invitation_pkey", + "schema": "public", + "table": "Invitation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Jwk_pkey", + "schema": "public", + "table": "Jwk", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Session_pkey", + "schema": "public", + "table": "Session", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "User_pkey", + "schema": "public", + "table": "User", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Verification_pkey", + "schema": "public", + "table": "Verification", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AutomatedResponse_pkey", + "schema": "public", + "table": "AutomatedResponse", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "BotField_pkey", + "schema": "public", + "table": "BotField", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Broadcast_pkey", + "schema": "public", + "table": "Broadcast", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "BroadcastRecurrence_pkey", + "schema": "public", + "table": "BroadcastRecurrence", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "BroadcastRecurrenceOccurrence_pkey", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Cart_pkey", + "schema": "public", + "table": "Cart", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ChannelPost_pkey", + "schema": "public", + "table": "ChannelPost", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CoexistSyncRun_pkey", + "schema": "public", + "table": "CoexistSyncRun", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomation_pkey", + "schema": "public", + "table": "CommentAutomation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomationEvent_pkey", + "schema": "public", + "table": "CommentAutomationEvent", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomationMiss_pkey", + "schema": "public", + "table": "CommentAutomationMiss", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomationReply_pkey", + "schema": "public", + "table": "CommentAutomationReply", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ConnectSession_pkey", + "schema": "public", + "table": "ConnectSession", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Connection_pkey", + "schema": "public", + "table": "Connection", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Contact_pkey", + "schema": "public", + "table": "Contact", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactCustomField_pkey", + "schema": "public", + "table": "ContactCustomField", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactInbox_pkey", + "schema": "public", + "table": "ContactInbox", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactNote_pkey", + "schema": "public", + "table": "ContactNote", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactOnSmartDelay_pkey", + "schema": "public", + "table": "ContactOnSmartDelay", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Conversation_pkey", + "schema": "public", + "table": "Conversation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ConversationParticipant_pkey", + "schema": "public", + "table": "ConversationParticipant", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Coupon_pkey", + "schema": "public", + "table": "Coupon", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CouponTopic_pkey", + "schema": "public", + "table": "CouponTopic", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CustomField_pkey", + "schema": "public", + "table": "CustomField", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DecisionConnection_pkey", + "schema": "public", + "table": "DecisionConnection", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DecisionProfile_pkey", + "schema": "public", + "table": "DecisionProfile", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DiscountCode_pkey", + "schema": "public", + "table": "DiscountCode", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DynamicImage_pkey", + "schema": "public", + "table": "DynamicImage", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "EcommerceOpenHours_pkey", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "pks" + }, + { + "columns": [ + "workspaceId" + ], + "nameExplicit": false, + "name": "EcommerceOrderCounter_pkey", + "schema": "public", + "table": "EcommerceOrderCounter", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "EcommerceSettings_pkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "EmailTopic_pkey", + "schema": "public", + "table": "EmailTopic", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AuditLog_pkey", + "schema": "public", + "table": "AuditLog", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CustomDomain_pkey", + "schema": "public", + "table": "CustomDomain", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "License_pkey", + "schema": "public", + "table": "License", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "PlatformAdmin_pkey", + "schema": "public", + "table": "PlatformAdmin", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Tenant_pkey", + "schema": "public", + "table": "Tenant", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TenantHelpItem_pkey", + "schema": "public", + "table": "TenantHelpItem", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "UserQuota_pkey", + "schema": "public", + "table": "UserQuota", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceUsage_pkey", + "schema": "public", + "table": "WorkspaceUsage", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ErrorLog_pkey", + "schema": "public", + "table": "ErrorLog", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ExternalWebhook_pkey", + "schema": "public", + "table": "ExternalWebhook", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookLeadAdsAutomation_pkey", + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookLeadAdsLead_pkey", + "schema": "public", + "table": "FacebookLeadAdsLead", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookMarketingMessage_pkey", + "schema": "public", + "table": "FacebookMarketingMessage", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookMarketingMessagesAuth_pkey", + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "File_pkey", + "schema": "public", + "table": "File", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Flow_pkey", + "schema": "public", + "table": "Flow", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowAnalyticsSession_pkey", + "schema": "public", + "table": "FlowAnalyticsSession", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowNodeStat_pkey", + "schema": "public", + "table": "FlowNodeStat", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowRun_pkey", + "schema": "public", + "table": "FlowRun", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowVersion_pkey", + "schema": "public", + "table": "FlowVersion", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Folder_pkey", + "schema": "public", + "table": "Folder", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "GoogleAdsConversionEvent_pkey", + "schema": "public", + "table": "GoogleAdsConversionEvent", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "GoogleAdsSettings_pkey", + "schema": "public", + "table": "GoogleAdsSettings", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IgStoryAutomation_pkey", + "schema": "public", + "table": "IgStoryAutomation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Import_pkey", + "schema": "public", + "table": "Import", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboundWebhook_pkey", + "schema": "public", + "table": "InboundWebhook", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboundWebhookRequest_pkey", + "schema": "public", + "table": "InboundWebhookRequest", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Inbox_pkey", + "schema": "public", + "table": "Inbox", + "entityType": "pks" + }, + { + "columns": [ + "inboxId" + ], + "nameExplicit": false, + "name": "InboxContactStat_pkey", + "schema": "public", + "table": "InboxContactStat", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboxTeam_pkey", + "schema": "public", + "table": "InboxTeam", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboxTeamMember_pkey", + "schema": "public", + "table": "InboxTeamMember", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationActiveCampaign_pkey", + "schema": "public", + "table": "IntegrationActiveCampaign", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationApi_pkey", + "schema": "public", + "table": "IntegrationApi", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Integration_pkey", + "schema": "public", + "table": "Integration", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationClaude_pkey", + "schema": "public", + "table": "IntegrationClaude", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationDeepseek_pkey", + "schema": "public", + "table": "IntegrationDeepseek", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationDrip_pkey", + "schema": "public", + "table": "IntegrationDrip", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationFacebookAds_pkey", + "schema": "public", + "table": "IntegrationFacebookAds", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGemini_pkey", + "schema": "public", + "table": "IntegrationGemini", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGetResponse_pkey", + "schema": "public", + "table": "IntegrationGetResponse", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGoogleAds_pkey", + "schema": "public", + "table": "IntegrationGoogleAds", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGoogleCalendar_pkey", + "schema": "public", + "table": "IntegrationGoogleCalendar", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGoogleSheet_pkey", + "schema": "public", + "table": "IntegrationGoogleSheet", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationInstagram_pkey", + "schema": "public", + "table": "IntegrationInstagram", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationKlaviyo_pkey", + "schema": "public", + "table": "IntegrationKlaviyo", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMailchimp_pkey", + "schema": "public", + "table": "IntegrationMailchimp", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMailerLite_pkey", + "schema": "public", + "table": "IntegrationMailerLite", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMessenger_pkey", + "schema": "public", + "table": "IntegrationMessenger", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMetaCatalog_pkey", + "schema": "public", + "table": "IntegrationMetaCatalog", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMoosend_pkey", + "schema": "public", + "table": "IntegrationMoosend", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOpenai_pkey", + "schema": "public", + "table": "IntegrationOpenai", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOpenaiCompatible_pkey", + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOpenrouter_pkey", + "schema": "public", + "table": "IntegrationOpenrouter", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOutlookCalendar_pkey", + "schema": "public", + "table": "IntegrationOutlookCalendar", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationSendGrid_pkey", + "schema": "public", + "table": "IntegrationSendGrid", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationSmtp_pkey", + "schema": "public", + "table": "IntegrationSmtp", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationTelegram_pkey", + "schema": "public", + "table": "IntegrationTelegram", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationThreads_pkey", + "schema": "public", + "table": "IntegrationThreads", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationTiktok_pkey", + "schema": "public", + "table": "IntegrationTiktok", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationWebchat_pkey", + "schema": "public", + "table": "IntegrationWebchat", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationWhatsapp_pkey", + "schema": "public", + "table": "IntegrationWhatsapp", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationZalo_pkey", + "schema": "public", + "table": "IntegrationZalo", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Leaderboard_pkey", + "schema": "public", + "table": "Leaderboard", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "LeaderboardAuditLog_pkey", + "schema": "public", + "table": "LeaderboardAuditLog", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MagicLink_pkey", + "schema": "public", + "table": "MagicLink", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MediaLibraryFile_pkey", + "schema": "public", + "table": "MediaLibraryFile", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MediaLibraryFolder_pkey", + "schema": "public", + "table": "MediaLibraryFolder", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessageCleanup_pkey", + "schema": "public", + "table": "MessageCleanup", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessagingAdOperation_pkey", + "schema": "public", + "table": "MessagingAdOperation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessagingAdsConnection_pkey", + "schema": "public", + "table": "MessagingAdsConnection", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessengerMessageTemplate_pkey", + "schema": "public", + "table": "MessengerMessageTemplate", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessengerWelcomeMessageFlow_pkey", + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MetaCapiEvent_pkey", + "schema": "public", + "table": "MetaCapiEvent", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MetaCatalogItem_pkey", + "schema": "public", + "table": "MetaCatalogItem", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MetaCatalogSyncRun_pkey", + "schema": "public", + "table": "MetaCatalogSyncRun", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniApp_pkey", + "schema": "public", + "table": "MiniApp", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniAppPublication_pkey", + "schema": "public", + "table": "MiniAppPublication", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniAppSubmission_pkey", + "schema": "public", + "table": "MiniAppSubmission", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniAppUpload_pkey", + "schema": "public", + "table": "MiniAppUpload", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Minigame_pkey", + "schema": "public", + "table": "Minigame", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MinigameContact_pkey", + "schema": "public", + "table": "MinigameContact", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MinigamePlay_pkey", + "schema": "public", + "table": "MinigamePlay", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DiscountCodeRedemption_pkey", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "OrderItem_pkey", + "schema": "public", + "table": "OrderItem", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Order_pkey", + "schema": "public", + "table": "Order", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "OrderStatusHistory_pkey", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Credential_pkey", + "schema": "public", + "table": "PlatformCredential", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Product_pkey", + "schema": "public", + "table": "Product", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductAddon_pkey", + "schema": "public", + "table": "ProductAddon", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductCategory_pkey", + "schema": "public", + "table": "ProductCategory", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductVariant_pkey", + "schema": "public", + "table": "ProductVariant", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductVariantOption_pkey", + "schema": "public", + "table": "ProductVariantOption", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "QuestionnaireAnswer_pkey", + "schema": "public", + "table": "QuestionnaireAnswer", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Questionnaire_pkey", + "schema": "public", + "table": "Questionnaire", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "QuestionnaireQuestion_pkey", + "schema": "public", + "table": "QuestionnaireQuestion", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "QuestionnaireSubmission_pkey", + "schema": "public", + "table": "QuestionnaireSubmission", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Reflink_pkey", + "schema": "public", + "table": "Reflink", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ResponseSlaPolicy_pkey", + "schema": "public", + "table": "ResponseSlaPolicy", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SavedReply_pkey", + "schema": "public", + "table": "SavedReply", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SavedReplyImage_pkey", + "schema": "public", + "table": "SavedReplyImage", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Sequence_pkey", + "schema": "public", + "table": "Sequence", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SequenceStep_pkey", + "schema": "public", + "table": "SequenceStep", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Spreadsheet_pkey", + "schema": "public", + "table": "Spreadsheet", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SystemField_pkey", + "schema": "public", + "table": "SystemField", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Tag_pkey", + "schema": "public", + "table": "Tag", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TagChannel_pkey", + "schema": "public", + "table": "TagChannel", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TelegramChat_pkey", + "schema": "public", + "table": "TelegramChat", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Template_pkey", + "schema": "public", + "table": "Template", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TemplateInstallation_pkey", + "schema": "public", + "table": "TemplateInstallation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TemplateInstalledResource_pkey", + "schema": "public", + "table": "TemplateInstalledResource", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Trigger_pkey", + "schema": "public", + "table": "Trigger", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Condition_pkey", + "schema": "public", + "table": "Condition", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TriggerExecution_pkey", + "schema": "public", + "table": "TriggerExecution", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TriggerStat_pkey", + "schema": "public", + "table": "TriggerStat", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "UserDeviceToken_pkey", + "schema": "public", + "table": "UserDeviceToken", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "UserPersistentMenu_pkey", + "schema": "public", + "table": "UserPersistentMenu", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Vendor_pkey", + "schema": "public", + "table": "Vendor", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Webhook_pkey", + "schema": "public", + "table": "Webhook", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WebhookExecution_pkey", + "schema": "public", + "table": "WebhookExecution", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappBusinessAccount_pkey", + "schema": "public", + "table": "WhatsappBusinessAccount", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappCall_pkey", + "schema": "public", + "table": "WhatsappCall", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappCallPermission_pkey", + "schema": "public", + "table": "WhatsappCallPermission", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappCoexistStaging_pkey", + "schema": "public", + "table": "WhatsappCoexistStaging", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappFlow_pkey", + "schema": "public", + "table": "WhatsappFlow", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappMessageTemplate_pkey", + "schema": "public", + "table": "WhatsappMessageTemplate", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappSignupSession_pkey", + "schema": "public", + "table": "WhatsappSignupSession", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHours_pkey", + "schema": "public", + "table": "WorkingHours", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHoursDateOverride_pkey", + "schema": "public", + "table": "WorkingHoursDateOverride", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHoursInterval_pkey", + "schema": "public", + "table": "WorkingHoursInterval", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHoursMember_pkey", + "schema": "public", + "table": "WorkingHoursMember", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Workspace_pkey", + "schema": "public", + "table": "Workspace", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceApiToken_pkey", + "schema": "public", + "table": "WorkspaceApiToken", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceBotMessageUsage_pkey", + "schema": "public", + "table": "WorkspaceBotMessageUsage", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceDeletionRecord_pkey", + "schema": "public", + "table": "WorkspaceDeletionRecord", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceMac_pkey", + "schema": "public", + "table": "WorkspaceMac", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceMember_pkey", + "schema": "public", + "table": "WorkspaceMember", + "entityType": "pks" + }, + { + "nameExplicit": true, + "columns": [ + "contactInboxId", + "sourceId", + "createdAt" + ], + "nullsNotDistinct": false, + "name": "Message_source_dedup_idx", + "entityType": "uniques", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId", + "parentId", + "name" + ], + "nullsNotDistinct": true, + "name": "ProductCategory_workspaceId_parent_name_key", + "entityType": "uniques", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "ResponseSlaPolicy_workspaceId_key", + "entityType": "uniques", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "nameExplicit": true, + "columns": [ + "token" + ], + "nullsNotDistinct": false, + "name": "UserDeviceToken_token_key", + "entityType": "uniques", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "nameExplicit": true, + "columns": [ + "id", + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "WorkingHours_id_workspaceId_key", + "entityType": "uniques", + "schema": "public", + "table": "WorkingHours" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId", + "userId" + ], + "nullsNotDistinct": false, + "name": "WorkingHoursMember_workspaceId_userId_key", + "entityType": "uniques", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "nameExplicit": true, + "columns": [ + "tokenHash" + ], + "nullsNotDistinct": false, + "name": "WorkspaceApiToken_tokenHash_key", + "entityType": "uniques", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId", + "periodStart" + ], + "nullsNotDistinct": false, + "name": "WorkspaceBotMessageUsage_workspaceId_periodStart_key", + "entityType": "uniques", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "WorkspaceDeletionRecord_workspaceId_key", + "entityType": "uniques", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId", + "periodStart", + "periodEnd" + ], + "nullsNotDistinct": false, + "name": "WorkspaceMac_workspaceId_periodStart_periodEnd_unique", + "entityType": "uniques", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "nullsNotDistinct": false, + "name": "UserQuota_userId_key", + "schema": "public", + "table": "UserQuota", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "WorkspaceUsage_workspaceId_key", + "schema": "public", + "table": "WorkspaceUsage", + "entityType": "uniques" + }, + { + "value": "(\"channel\" = 'whatsapp' AND \"integrationWhatsappId\" IS NOT NULL AND \"ctwaClid\" IS NOT NULL AND \"wabaId\" IS NOT NULL) OR (\"channel\" = 'messenger' AND \"integrationMessengerId\" IS NOT NULL) OR (\"channel\" = 'instagram' AND \"integrationInstagramId\" IS NOT NULL)", + "name": "AdsConversionEvent_channel_integration_check", + "entityType": "checks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "value": "\"parentBroadcastId\" IS NULL OR \"occurrenceAt\" IS NOT NULL", + "name": "Broadcast_occurrence_pair_check", + "entityType": "checks", + "schema": "public", + "table": "Broadcast" + }, + { + "value": "((\"actorUserId\" IS NOT NULL)::int + (\"actorTokenId\" IS NOT NULL)::int) <= 1", + "name": "ConnectSession_actor_at_most_one", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "\"status\" IN ('pending', 'authorized', 'awaiting_selection', 'completed', 'failed', 'expired', 'cancelled')", + "name": "ConnectSession_status_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "\"purpose\" IN ('connect', 'reconnect', 'facebook_ads', 'messaging_ads', 'lead_ads', 'meta_catalog')", + "name": "ConnectSession_purpose_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "\"errorCode\" IN ('state_mismatch', 'expired', 'provider_denied', 'exchange_failed', 'provider_error', 'no_candidates', 'already_connected', 'quota_exceeded', 'trial_expired', 'internal_error')", + "name": "ConnectSession_errorCode_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "\"errorCode\" IS NULL OR \"status\" IN ('failed', 'expired', 'cancelled')", + "name": "ConnectSession_errorCode_terminal_failure_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "(\"status\" IN ('completed', 'failed', 'expired', 'cancelled')) = (\"consumedAt\" IS NOT NULL)", + "name": "ConnectSession_terminal_consumedAt_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "\"status\" NOT IN ('completed', 'failed', 'expired', 'cancelled') OR \"encryptedAuth\" IS NULL", + "name": "ConnectSession_terminal_clears_encryptedAuth_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "\"purpose\" <> 'reconnect' OR \"status\" IN ('completed', 'failed', 'expired', 'cancelled') OR \"targetConnectionId\" IS NOT NULL", + "name": "ConnectSession_active_reconnect_requires_target_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "(\n (\"kind\" = 'channel' AND \"inboxId\" IS NOT NULL AND \"channel\" IS NOT NULL)\n OR\n (\"kind\" = 'integration' AND \"inboxId\" IS NULL AND \"channel\" IS NULL AND \"integrationId\" IS NOT NULL)\n )", + "name": "Connection_kind_relation_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "NOT (\"inboxId\" IS NOT NULL AND \"integrationId\" IS NOT NULL)", + "name": "Connection_inbox_integration_exclusive_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "\"kind\" IN ('channel', 'integration')", + "name": "Connection_kind_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "\"status\" IN ('connected', 'degraded', 'needs_reauth', 'paused', 'disconnected')", + "name": "Connection_status_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "\"statusReason\" IN ('manual', 'workspace_purge', 'trial_expired', 'tenant_suspended', 'token_revoked', 'provider_revoked', 'refresh_failed', 'verify_failed', 'quota_exceeded', 'orphaned_webhook')", + "name": "Connection_statusReason_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "(\"status\" = 'connected') = (\"statusReason\" IS NULL)", + "name": "Connection_status_reason_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "(\"status\" = 'disconnected') = (\"disconnectedAt\" IS NOT NULL)", + "name": "Connection_disconnectedAt_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "(\"activityType\" = 'flowExecuted' AND \"referenceType\" = 'flow' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'flowNodeExecuted' AND \"referenceType\" = 'flowNode' AND \"parentReferenceId\" <> 0) OR (\"activityType\" = 'automatedResponseMatched' AND \"referenceType\" = 'automatedResponse' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'formCompleted' AND \"referenceType\" = 'whatsappFlow' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageSent' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageDelivered' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageOpened' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageClicked' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0)", + "name": "ContactActivity_allowed_pair_check", + "entityType": "checks", + "schema": "public", + "table": "ContactActivity" + }, + { + "value": "\"usedCount\" >= 0 AND (\"usageLimit\" IS NULL OR \"usedCount\" <= \"usageLimit\")", + "name": "DiscountCode_usedCount_check", + "entityType": "checks", + "schema": "public", + "table": "DiscountCode" + }, + { + "value": "\"serviceFeePercent\" >= 0 AND \"serviceFeePercent\" <= 100", + "name": "EcommerceSettings_serviceFeePercent_check", + "entityType": "checks", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "value": "\"status\" NOT IN ('sent', 'processed') OR (\"requestId\" IS NOT NULL AND \"sentAt\" IS NOT NULL)", + "name": "GoogleAdsConversionEvent_sent_requires_request_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "\"status\" <> 'sending' OR (\"claimToken\" IS NOT NULL AND \"claimedAt\" IS NOT NULL)", + "name": "GoogleAdsConversionEvent_sending_requires_claim_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "\"processingStatus\" IS NULL OR \"status\" IN ('sent', 'processed', 'failed')", + "name": "GoogleAdsConversionEvent_processing_status_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "\"failureStage\" IS NULL OR \"status\" = 'failed'", + "name": "GoogleAdsConversionEvent_failure_stage_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "(\"value\" IS NULL) = (\"currency\" IS NULL)", + "name": "GoogleAdsConversionEvent_value_currency_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "\"value\" IS NULL OR \"value\" >= 0", + "name": "GoogleAdsConversionEvent_value_non_negative_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "length(\"clickId\") BETWEEN 10 AND 512", + "name": "GoogleAdsConversionEvent_clickId_length_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "\"uploadMethod\" IN ('dataManager', 'legacy')", + "name": "GoogleAdsConversionEvent_uploadMethod_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "\"attempt\" >= 0 AND \"processingAttempts\" >= 0", + "name": "GoogleAdsConversionEvent_attempt_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "(\"registrationStatus\" <> 'failed' OR \"registrationError\" IS NOT NULL)\n AND (\"registrationStatus\" <> 'registered' OR \"registrationError\" IS NULL)", + "name": "IntegrationWhatsapp_registrationStatus_error_consistent", + "entityType": "checks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "value": "(\"channel\" = 'whatsapp' AND \"integrationWhatsappId\" IS NOT NULL AND \"integrationMessengerId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'messenger' AND \"integrationMessengerId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'instagram' AND \"integrationInstagramId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationMessengerId\" IS NULL)", + "name": "MessagingAdOperation_channel_integration_check", + "entityType": "checks", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "value": "(\"channel\" = 'whatsapp' AND \"integrationWhatsappId\" IS NOT NULL AND \"integrationMessengerId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'messenger' AND \"integrationMessengerId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'instagram' AND \"integrationInstagramId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationMessengerId\" IS NULL)", + "name": "MessagingAdsConnection_channel_integration_check", + "entityType": "checks", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "value": "\"channel\" IN ('messenger', 'instagram', 'whatsapp')", + "name": "MetaCapiEvent_channel_check", + "entityType": "checks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "value": "\"actionSource\" IN ('business_messaging', 'email', 'phone_call', 'chat', 'physical_store', 'system_generated', 'other')", + "name": "MetaCapiEvent_actionSource_check", + "entityType": "checks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "value": "\"contentType\" IN ('product', 'product_group')", + "name": "MetaCapiEvent_contentType_check", + "entityType": "checks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "value": "(\"customFieldId\" IS NULL) OR (\"systemFieldKey\" IS NULL)", + "name": "QuestionnaireQuestion_customFieldId_systemFieldKey_exclusive", + "entityType": "checks", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "value": "\"firstResponseTargetSeconds\" > 0 AND (\"nextResponseTargetSeconds\" IS NULL OR \"nextResponseTargetSeconds\" > 0)", + "name": "ResponseSlaPolicy_targets_check", + "entityType": "checks", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "value": "\"breachingThresholdPercent\" BETWEEN 1 AND 99", + "name": "ResponseSlaPolicy_threshold_check", + "entityType": "checks", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "value": "\"discountPercent\" >= 0 AND \"discountPercent\" <= 100", + "name": "Vendor_discountPercent_check", + "entityType": "checks", + "schema": "public", + "table": "Vendor" + }, + { + "value": "cardinality(\"candidatePhoneNumberIds\") > 0", + "name": "WhatsappSignupSession_candidates_not_empty", + "entityType": "checks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "value": "\"weekday\" BETWEEN 0 AND 6", + "name": "WorkingHoursInterval_weekday_check", + "entityType": "checks", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "value": "0 <= \"startMinute\" AND \"startMinute\" < \"endMinute\" AND \"endMinute\" <= 1440", + "name": "WorkingHoursInterval_minutes_check", + "entityType": "checks", + "schema": "public", + "table": "WorkingHoursInterval" + } + ], + "renames": [] +} diff --git a/packages/database/drizzle/20261025021303_add_workspace_mac_owner_indexes/migration.sql b/packages/database/drizzle/20261025021303_add_workspace_mac_owner_indexes/migration.sql new file mode 100644 index 0000000000..da4554492a --- /dev/null +++ b/packages/database/drizzle/20261025021303_add_workspace_mac_owner_indexes/migration.sql @@ -0,0 +1,20 @@ +-- Owner/tenant indexes on WorkspaceMac plus validation of the owner FK added +-- NOT VALID in retain_workspace_billing. CREATE INDEX CONCURRENTLY cannot run in +-- a transaction, so this file runs unwrapped and every statement is re-runnable: +-- each index is preceded by a guard that drops a leftover INVALID build, and +-- VALIDATE CONSTRAINT is a no-op once the constraint is valid. +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"WorkspaceMac_ownerId_periodStart_idx"') AND NOT indisvalid) THEN + DROP INDEX "WorkspaceMac_ownerId_periodStart_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "WorkspaceMac_ownerId_periodStart_idx" ON "WorkspaceMac" ("ownerId","periodStart");--> statement-breakpoint +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_index WHERE indexrelid = to_regclass('"WorkspaceMac_tenantId_periodStart_idx"') AND NOT indisvalid) THEN + DROP INDEX "WorkspaceMac_tenantId_periodStart_idx"; + END IF; +END $$;--> statement-breakpoint +CREATE INDEX CONCURRENTLY IF NOT EXISTS "WorkspaceMac_tenantId_periodStart_idx" ON "WorkspaceMac" ("tenantId","periodStart");--> statement-breakpoint +ALTER TABLE "WorkspaceMac" VALIDATE CONSTRAINT "WorkspaceMac_ownerId_User_id_fkey"; diff --git a/packages/database/drizzle/20261025021303_add_workspace_mac_owner_indexes/snapshot.json b/packages/database/drizzle/20261025021303_add_workspace_mac_owner_indexes/snapshot.json new file mode 100644 index 0000000000..a997052743 --- /dev/null +++ b/packages/database/drizzle/20261025021303_add_workspace_mac_owner_indexes/snapshot.json @@ -0,0 +1,63308 @@ +{ + "id": "b01340e2-fd19-4bb0-a557-79fe40f3a648", + "prevIds": [ + "9cb9d9e1-e1a1-42c4-b7bd-8099d81756c4" + ], + "version": "8", + "dialect": "postgres", + "ddl": [ + { + "values": [ + "pending", + "sent", + "failed", + "skipped_no_scope", + "skipped_region" + ], + "name": "adsConversionCapiStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "automatic", + "rule", + "trigger" + ], + "name": "adsConversionEventSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "whatsapp", + "facebook", + "messenger", + "instagram" + ], + "name": "adsConversionChannel", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "lead", + "purchase" + ], + "name": "adsConversionEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "success", + "error", + "processing" + ], + "name": "aiConversationEmbeddingStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "processing", + "success", + "error" + ], + "name": "aiConversationSourceStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "document", + "image", + "url", + "web_search" + ], + "name": "aiConversationSourceType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "success", + "error", + "processing" + ], + "name": "aiEmbeddingStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "enable", + "disable" + ], + "name": "aiHandoverBulkAction", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "running", + "cancelling", + "completed", + "failed", + "cancelled" + ], + "name": "aiHandoverBulkStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "automated_response", + "ai_agent", + "flow", + "none" + ], + "name": "analyticsBotResponseType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "success", + "fallback" + ], + "name": "analyticsBotResult", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flow", + "agent", + "fallback" + ], + "name": "analyticsBotRouteType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "message:sent", + "message:delivered", + "message:seen", + "message:failed", + "flow:clicked" + ], + "name": "analyticsBroadcastEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "contact_created", + "contact_deleted", + "contact_blocked" + ], + "name": "analyticsContactEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "bot", + "human" + ], + "name": "analyticsContactSenderType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "conversation_created", + "conversation_assigned", + "conversation_unassigned", + "conversation_transferred_to_human", + "conversation_transferred_to_bot", + "conversation_followed", + "conversation_unfollowed", + "conversation_archived", + "conversation_unarchived" + ], + "name": "analyticsConversationEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "message_human_sent", + "message_bot_sent" + ], + "name": "analyticsMessageEventType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "processing", + "ingested", + "failed" + ], + "name": "analyticsStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "synced", + "failed" + ], + "name": "appointmentExternalSyncStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "inPerson", + "phoneCall", + "onlineMeeting" + ], + "name": "appointmentLocationTypeSnapshot", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "scheduled", + "cancelled" + ], + "name": "appointmentStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "inPerson", + "phoneCall", + "onlineMeeting" + ], + "name": "appointmentLocationType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "rollingDays", + "dateRange", + "specificDay", + "anyFutureDate" + ], + "name": "appointmentScheduleWindowType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "minutes", + "hours", + "days" + ], + "name": "appointmentReminderTimingUnit", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "sent", + "cancelled", + "failed" + ], + "name": "appointmentReminderDispatchStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "image", + "video", + "audio", + "gif", + "file" + ], + "name": "fileType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "inbound", + "outbound" + ], + "name": "automatedResponseType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "defaultReply" + ], + "name": "automationThrottleType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "now", + "future", + "recurring" + ], + "name": "broadcastScheduleType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "scheduled", + "sent", + "sending", + "cancelled", + "draft", + "failed", + "recurring" + ], + "name": "broadcastStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "created", + "skipped", + "missed" + ], + "name": "broadcastOccurrenceOutcome", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "catchUpSuperseded", + "paused", + "draft", + "blockedOwner", + "planLimit", + "noTargets", + "undeliverable", + "excludedDate" + ], + "name": "broadcastOccurrenceReason", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "whatsapp", + "messenger", + "instagram" + ], + "name": "coexistChannel", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "contacts", + "messages" + ], + "name": "coexistMessengerSyncPhase", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "init", + "running", + "succeeded", + "failed", + "partial", + "waiting" + ], + "name": "coexistRunStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "coexist", + "contact_scan" + ], + "name": "coexistRunType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "messenger", + "instagram", + "instagramFacebook", + "threads", + "tiktok" + ], + "name": "commentAutomationType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "equal", + "contain" + ], + "name": "commentExcludeKeywordsType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "sent", + "failed" + ], + "name": "commentAutomationEventStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "public", + "private" + ], + "name": "commentAutomationReplyChannel", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "AIAgent", + "text", + "flow", + "none" + ], + "name": "commentAutomationReplyType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "outsideSchedule", + "postNotMatched", + "commentIsReply", + "keywordsNotMatched", + "mentionCountNotMatched", + "contactNotNew", + "alreadyRepliedOnPost", + "engagedOnOtherPost" + ], + "name": "commentAutomationMissReason", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "male", + "female", + "unknown" + ], + "name": "gender", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flow", + "flowNode", + "automatedResponse", + "whatsappFlow", + "emailTopic" + ], + "name": "contactActivityReferenceType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flowExecuted", + "flowNodeExecuted", + "automatedResponseMatched", + "formCompleted", + "messageSent", + "messageDelivered", + "messageOpened", + "messageClicked" + ], + "name": "contactActivityType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "captured", + "unavailable", + "failed" + ], + "name": "contactInboxProfileSnapshotState", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "text", + "location", + "refLink", + "image", + "video", + "audio", + "gif", + "file", + "storyMention" + ], + "name": "lastUserInputType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "inboundReceived", + "standbyReceived", + "controlPassed", + "controlTaken", + "taken", + "released", + "passed", + "serviceSent", + "serviceRejected" + ], + "name": "threadControlEvent", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "owned", + "standby", + "idle" + ], + "name": "threadControlState", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "scheduled", + "completed", + "failed", + "canceled" + ], + "name": "ContactOnSmartDelayStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "waitNode", + "followUp", + "quickReplyFollowUp" + ], + "name": "ContactOnSmartDelayType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "active", + "archived" + ], + "name": "couponTopicStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "shortText", + "email", + "phoneNumber", + "number", + "date", + "datetime", + "boolean", + "longText" + ], + "name": "customFieldType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "enabled", + "disabled" + ], + "name": "DecisionConnectionStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "passed", + "failed" + ], + "name": "DecisionConnectionTestStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "typesafe", + "systemOneCompatible", + "openrouterDecision" + ], + "name": "DecisionProviderKind", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "enabled", + "disabled" + ], + "name": "DecisionProfileStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "entireOrder", + "category", + "products" + ], + "name": "discountAppliesTo", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "everyone", + "specificCustomers" + ], + "name": "discountEligibility", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "none", + "amount", + "quantity" + ], + "name": "discountMinimumType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "percentage", + "fixedAmount", + "freeShipping" + ], + "name": "discountType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "default", + "externalLink", + "flow", + "productPage" + ], + "name": "checkoutMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "left", + "leftSpace", + "right", + "rightSpace" + ], + "name": "currencyPosition", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "default", + "flow", + "none" + ], + "name": "orderConfirmationMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "bigSquare", + "mediumRectangle" + ], + "name": "productImageSize", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "none", + "delivery", + "pickup", + "deliveryAndPickup" + ], + "name": "shippingMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "list", + "listWithoutImage", + "card", + "cardSquare", + "image", + "imageSquare" + ], + "name": "webshopProductView", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "import", + "generic", + "export" + ], + "name": "fileContextType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "uploaded", + "failed" + ], + "name": "fileStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "tag", + "flow", + "customField", + "automatedResponse", + "trigger", + "webhook", + "sequence", + "emailTopic", + "fbComment", + "igComment", + "igStory", + "outboundAutomatedResponse" + ], + "name": "folderType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "gclid", + "gbraid" + ], + "name": "googleAdsClickIdType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flowStep", + "triggerAction" + ], + "name": "googleAdsEventSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "sending", + "sent", + "processed", + "failed", + "skipped_no_account", + "skipped_expired" + ], + "name": "googleAdsEventStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "delivery", + "processing", + "timeout" + ], + "name": "googleAdsFailureStage", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "processing", + "success", + "partial_success", + "failed", + "unknown", + "timed_out" + ], + "name": "googleAdsProcessingStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "storyReply", + "storyMention" + ], + "name": "igStoryAutomationTrigger", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "instagram", + "instagramFacebook" + ], + "name": "igStoryAutomationType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "csv", + "xlsx", + "xls", + "json" + ], + "name": "importFormat", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "processing", + "completed", + "failed" + ], + "name": "importStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "contacts", + "coupons", + "products", + "flow" + ], + "name": "importType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "received", + "processing", + "processed", + "completedWithErrors", + "skipped", + "failed" + ], + "name": "inboundWebhookRequestStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "oauth", + "fbe" + ], + "name": "metaCatalogAuthMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "active", + "invalid" + ], + "name": "metaCatalogConnectionStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "idle", + "queued", + "running", + "succeeded", + "partial", + "failed" + ], + "name": "metaCatalogImportStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "metaNative", + "browserWhisper" + ], + "name": "whatsappCallRecordingMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "metaNative", + "browserWhisper" + ], + "name": "whatsappCallTranscriptionMode", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending_verification", + "registered", + "failed" + ], + "name": "whatsappRegistrationStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "messenger", + "instagram", + "whatsapp", + "zalo", + "telegram", + "tiktok", + "threads", + "email", + "gamification" + ], + "name": "leaderboardPlatform", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "draft", + "active", + "paused", + "finished" + ], + "name": "leaderboardStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "adjust", + "resetOne", + "resetAll", + "ban", + "unban" + ], + "name": "leaderboardAuditAction", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "rule", + "flow", + "referral", + "manual", + "reset" + ], + "name": "leaderboardScoreSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "text", + "location", + "refLink" + ], + "name": "contentType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "message", + "comment" + ], + "name": "messageKind", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "incoming", + "outgoing", + "activity" + ], + "name": "messageType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "bot", + "contact", + "system", + "user", + "api" + ], + "name": "senderType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "processing", + "completed", + "failed" + ], + "name": "MessageCleanupStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "whatsapp", + "messenger", + "instagram" + ], + "name": "messagingAdChannel", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "campaignCreated", + "adSetCreated", + "creativeCreated", + "adCreated", + "failed" + ], + "name": "messagingAdCreateState", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "draft", + "publishing", + "published", + "pausing", + "paused", + "deleting", + "deleted", + "publishFailed" + ], + "name": "messagingAdPublishState", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "push", + "import" + ], + "name": "metaCatalogItemDirection", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "all", + "category", + "selected" + ], + "name": "metaCatalogSyncScope", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "queued", + "running", + "succeeded", + "partial", + "failed" + ], + "name": "metaCatalogSyncStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "web" + ], + "name": "miniAppSubmissionSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "submitted" + ], + "name": "miniAppUploadStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "luckyWheel", + "jackpot", + "gashapon", + "drawLots", + "scratchOff" + ], + "name": "minigameType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "user", + "apiToken", + "system", + "contact" + ], + "name": "orderActorType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "webshop", + "api", + "manual" + ], + "name": "orderSource", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "accepted", + "shipped", + "concluded", + "cancelled" + ], + "name": "orderStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "cod" + ], + "name": "paymentMethod", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "unpaid", + "paid", + "refunded" + ], + "name": "paymentStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "delivery", + "pickup" + ], + "name": "shippingType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "dont_track", + "track" + ], + "name": "inventoryPolicy", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "text", + "number", + "email", + "phone", + "multipleChoice", + "date", + "datetime", + "image", + "file", + "location", + "websiteLink" + ], + "name": "questionnaireQuestionType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "inProgress", + "completed", + "cancelled", + "failed", + "timeout" + ], + "name": "questionnaireSubmissionStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "refLink", + "qrCode" + ], + "name": "ReflinkType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "me" + ], + "name": "SystemFieldType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "creator", + "administrator", + "member", + "restricted", + "left", + "kicked" + ], + "name": "telegramBotChatStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "private", + "group", + "supergroup", + "channel" + ], + "name": "telegramChatType", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "installing", + "completed", + "partial", + "failed" + ], + "name": "templateInstallationStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "flows", + "products", + "aiFunctions", + "aiAgents", + "calendars", + "webchats", + "keywords", + "entryPointLinks", + "triggers", + "fbCommentAutomations", + "settings", + "customFields", + "tags", + "productCategories" + ], + "name": "templateResourceCategory", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "ios", + "android" + ], + "name": "devicePlatform", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "userInitiated", + "businessInitiated" + ], + "name": "whatsappCallDirection", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "completed", + "failed", + "rejected", + "canceled" + ], + "name": "whatsappCallOutcome", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "ringing", + "accepted", + "rejected", + "completed", + "failed" + ], + "name": "whatsappCallStatus", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "accept", + "reject" + ], + "name": "whatsappCallPermissionResponse", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "allTime", + "oncePerHour", + "oncePerDay" + ], + "name": "defaultReplyFrequency", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "full", + "read_only" + ], + "name": "WorkspaceApiTokenPermission", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "owner", + "agent" + ], + "name": "workspaceMemberRole", + "entityType": "enums", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessageShard", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ShardTimeRange", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AdsConversionEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AdsConversionRule", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIAgent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIConversationEmbedding", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIConversationSource", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIEmbedding", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIFile", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIFunction", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIHandoverBulkRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIHandoverSettings", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AIMCPServer", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsAgentResponseEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsBotMessageEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsBroadcastEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsContactEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsConversationEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsFlowNodeEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsMessageEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsSequenceEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsEmailTopic", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AnalyticsManifestStatus", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Appointment", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentCalendar", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentCalendarAvailability", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentCalendarReminder", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AppointmentReminderDispatch", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Attachment", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Account", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Invitation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Jwk", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Session", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "User", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Verification", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AutomatedResponse", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AutomationThrottle", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "BotField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Broadcast", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "BroadcastRecurrence", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "BroadcastRecurrenceOccurrence", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "BroadcastTarget", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Cart", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ChannelPost", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CoexistSyncRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CommentAutomation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CommentAutomationEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CommentAutomationMiss", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CommentAutomationReply", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ConnectSession", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Connection", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Contact", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactActiveHourly", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactActiveMonthly", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactActivity", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactCustomField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactInbox", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactInboxPost", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactKeywordMessage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactNote", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactOnBroadcast", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactOnSequence", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactOnSmartDelay", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactState", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactToTag", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ContactToTagChannel", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Conversation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ConversationParticipant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Coupon", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CouponTopic", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CustomField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "DecisionConnection", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "DecisionProfile", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "DiscountCode", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "DynamicImage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "EcommerceOpenHours", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "EcommerceOrderCounter", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "EcommerceSettings", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "EmailTopic", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "AuditLog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "CustomDomain", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "License", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "PlatformAdmin", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Tenant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TenantHelpItem", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "UserQuota", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceUsage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ErrorLog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ExternalWebhook", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FacebookLeadAdsAutomation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FacebookLeadAdsLead", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FacebookMarketingMessage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FacebookMarketingMessagesAuth", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "File", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Flow", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowAnalyticsSession", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowNodeStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "FlowVersion", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Folder", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "GoogleAdsConversionEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "GoogleAdsSettings", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IgStoryAutomation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Import", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboundWebhook", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboundWebhookRequest", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Inbox", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboxContactStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboxTeam", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "InboxTeamMember", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationActiveCampaign", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationApi", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Integration", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationClaude", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationDeepseek", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationDrip", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationFacebookAds", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGemini", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGetResponse", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGoogleAds", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGoogleCalendar", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationGoogleSheet", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationInstagram", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationKlaviyo", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMailchimp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMailerLite", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMessenger", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMetaCatalog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationMoosend", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOpenai", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOpenaiCompatible", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOpenrouter", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationOutlookCalendar", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationSendGrid", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationSmtp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationTelegram", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationThreads", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationTiktok", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationWebchat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationWhatsapp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "IntegrationZalo", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Leaderboard", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "LeaderboardAuditLog", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "LeaderboardParticipant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "LeaderboardScoreEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MagicLink", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MagicLinkStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MediaLibraryFile", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MediaLibraryFolder", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Message", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessageCleanup", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessagingAdOperation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessagingAdsConnection", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessengerMessageTemplate", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MessengerWelcomeMessageFlow", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MetaCapiEvent", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MetaCatalogItem", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MetaCatalogSyncRun", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MiniApp", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MiniAppPublication", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MiniAppSubmission", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MiniAppUpload", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Minigame", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MinigameContact", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "MinigamePlay", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "DiscountCodeRedemption", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "OrderItem", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Order", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "OrderStatusHistory", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "PlatformCredential", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Product", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductAddon", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductCategory", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductVariant", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ProductVariantOption", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "QuestionnaireAnswer", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Questionnaire", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "QuestionnaireQuestion", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "QuestionnaireSubmission", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "RefLinkStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Reflink", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "ResponseSlaPolicy", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SavedReply", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SavedReplyImage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Sequence", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SequenceDispatch", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SequenceStep", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Spreadsheet", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "SystemField", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Tag", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TagChannel", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TelegramChat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Template", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TemplateInstallation", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TemplateInstalledResource", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Trigger", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Condition", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TriggerContactHistory", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TriggerExecution", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "TriggerStat", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "UserDeviceToken", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "UserPersistentMenu", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Vendor", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Webhook", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WebhookExecution", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappBusinessAccount", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappCall", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappCallPermission", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappCoexistStaging", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappFlow", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappMessageTemplate", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WhatsappSignupSession", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkingHours", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkingHoursDateOverride", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkingHoursInterval", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkingHoursMember", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "Workspace", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceApiToken", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceBotMessageUsage", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceDeletionRecord", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceMac", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "WorkspaceMember", + "entityType": "tables", + "schema": "public" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "5432", + "generated": null, + "identity": null, + "name": "port", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "database", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credentialRef", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "'disable'", + "generated": null, + "identity": null, + "name": "sslMode", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isMain", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shardKey", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "readHost", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "readPort", + "entityType": "columns", + "schema": "public", + "table": "MessageShard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shardId", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'whatsapp'", + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionEventSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ctwaClid", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contents", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceEventId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "adsConversionCapiStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "capiStatus", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiSentAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "adsConversionChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationFacebookAdsId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "adsConversionEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "trigger", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "markAs", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actionPrompt", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "actionRules", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "messages", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isDefault", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isRichResponse", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "tools", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "webSearchAuthorizedDomains", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "models", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "AIAgent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chunkIndex", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "vector(1536)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "embedding", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "aiConversationEmbeddingStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attachmentId", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "aiConversationSourceType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceType", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "aiConversationSourceStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceKey", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentHash", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "summary", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "AIConversationSource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "vector(1536)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "embedding", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "aiEmbeddingStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiFileId", + "entityType": "columns", + "schema": "public", + "table": "AIEmbedding" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purpose", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dataCollect", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outputMessage", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerFlowId", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIFunction" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "aiHandoverBulkAction", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "aiHandoverBulkStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "message", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestedByUserId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestedAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastHeartbeatAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pausedUntil", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chunkSeq", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedCount", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cursorContactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inFlightFromId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inFlightToId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentError", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "scheduleEnabled", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timeRanges", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "gotoFlowId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "returnMessage", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "pauseBotWaitingForStaff", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "applyToAllCustomers", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "applyToAllRevision", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "applyToAllMessage", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "applyToAllRequestedByUserId", + "entityType": "columns", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "availableTools", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "selectedTools", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AIMCPServer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "awaitingSince", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "measuredFrom", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseSeconds", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingResponseSeconds", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isFirstResponse", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slaTargetSeconds", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slaMet", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasResponse", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "analyticsBotResponseType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "analyticsBotRouteType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "routeType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "analyticsBotResult", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "result", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiProvider", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "analyticsBroadcastEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "batchId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "analyticsContactEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "analyticsContactSenderType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "analyticsConversationEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromAssignee", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "toAssignee", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "analyticsId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "buttonId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "analyticsMessageEventType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "analyticsContactSenderType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "insertedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicReferenceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstSeenAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSeenAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seenCount", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstClickedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastClickedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clickCount", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "objectKey", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "analyticsStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "timestamp", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ingestedAt", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inviteeTimezone", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "appointmentStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'scheduled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "appointmentLocationTypeSnapshot", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationType", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationDetail", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventIntegrationId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventProviderCalendarId", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "appointmentExternalSyncStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalSyncStatus", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Appointment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "30", + "generated": null, + "identity": null, + "name": "durationMinutes", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bufferAfterMinutes", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "appointmentLocationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationType", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locationDetail", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "appointmentScheduleWindowType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'rollingDays'", + "generated": null, + "identity": null, + "name": "scheduleWindowType", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "scheduleWindowConfig", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxAppointmentsPerUser", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "dailyLimitEnabled", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxPerDay", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowGroupMeeting", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxPerSlot", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "confirmationMessage", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "confirmationFlowId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancellationFlowId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalConnectionId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventTitleTemplate", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventDescriptionTemplate", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalEventAttendeesTemplate", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicLinkSlug", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "weekday", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startMinute", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endMinute", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "calendarId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timingValue", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "appointmentReminderTimingUnit", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timingUnit", + "entityType": "columns", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appointmentId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reminderConfigId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "appointmentReminderDispatchStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "jobId", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sentAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedReason", + "entityType": "columns", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageCreatedAt", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "fileType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileType", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "width", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "height", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnailPath", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originPath", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "keepOriginal", + "entityType": "columns", + "schema": "public", + "table": "Attachment" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "providerId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accessToken", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accessTokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refreshToken", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refreshTokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idToken", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "password", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "Account" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "invitedBy", + "entityType": "columns", + "schema": "public", + "table": "Invitation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicKey", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "privateKey", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Jwk" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ipAddress", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "Session" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "emailVerified", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isAnonymous", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "mustChangePassword", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "User" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "identifier", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "Verification" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "keywords", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "automatedResponseType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'inbound'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "type": "automationThrottleType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "throttleType", + "entityType": "columns", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subjectId", + "entityType": "columns", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastTriggeredAt", + "entityType": "columns", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimId", + "entityType": "columns", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "customFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "BotField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateData", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'channel'", + "generated": null, + "identity": null, + "name": "targetMode", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "broadcastStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "broadcastScheduleType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schedulesType", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "schedulesAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactFilter", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subaction", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactCount", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handoffCompletedAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "resumeCount", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "audienceRangeStart", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "audienceRangeEnd", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendRatePerMinute", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentBroadcastId", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurrenceAt", + "entityType": "columns", + "schema": "public", + "table": "Broadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rule", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextRunAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountedThroughAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "occurrenceCount", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastOccurrenceAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pausedAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endedAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recurrenceId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "localSlot", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurrenceAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "broadcastOccurrenceOutcome", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outcome", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "broadcastOccurrenceReason", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "childBroadcastId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "materializedAt", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "supersededCount", + "entityType": "columns", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateData", + "entityType": "columns", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "items", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCode", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastActivityAt", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "abandonedNotifiedAt", + "entityType": "columns", + "schema": "public", + "table": "Cart" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceAccountId", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalPostId", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "caption", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mediaType", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnail", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permalink", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publishedAt", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadataFetchedAt", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadataAttemptedAt", + "entityType": "columns", + "schema": "public", + "table": "ChannelPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistRunType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'coexist'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistRunStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'init'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerSource", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastHeartbeatAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalScan", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentScan", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentPageNumber", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedContactCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedMessageCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentError", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastPhase", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastChunkOrder", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "syncProgress", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "coexistMessengerSyncPhase", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'contacts'", + "generated": null, + "identity": null, + "name": "messengerSyncPhase", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pendingPatches", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scanFromAt", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestedByUserId", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resumeCursor", + "entityType": "columns", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "commentAutomationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'messenger'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "repliesCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sentCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "deliveredCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seenCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clickedCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "missedCount", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "post", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"text\",\"value\":\"\"}'", + "generated": null, + "identity": null, + "name": "privateReply", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"none\",\"value\":null}'", + "generated": null, + "identity": null, + "name": "publicReply", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "includeKeywords", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "excludeKeywords", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "commentExcludeKeywordsType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'contain'", + "generated": null, + "identity": null, + "name": "excludeKeywordsType", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"replyToNewContactsOnly\":false,\"replyOncePerUserPerPost\":false,\"likeUserComment\":false,\"replyToUsersWhoCommentedOnOtherPosts\":true,\"ignoreCommentReplies\":true,\"trackUserTags\":false}'", + "generated": null, + "identity": null, + "name": "options", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"all\":false,\"hasPhoneNumber\":false,\"hasImage\":false,\"hasVideo\":false,\"hasLink\":false,\"hasKeywords\":false,\"hasGif\":false,\"hasEmoji\":false,\"keywords\":[],\"showCommentsAfter\":\"none\"}'", + "generated": null, + "identity": null, + "name": "hideComments", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"immediately\",\"value\":0}'", + "generated": null, + "identity": null, + "name": "replyAfter", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentText", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "commentAutomationReplyChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replyChannel", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "commentAutomationReplyType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replyType", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replyText", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "commentAutomationEventStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorDetail", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "httpCode", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentText", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "commentAutomationMissReason", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purpose", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "targetConnectionId", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorUserId", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorTokenId", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "platformOwnerId", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originHost", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "returnUrl", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stateNonceHash", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'authorize'", + "generated": null, + "identity": null, + "name": "step", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextAction", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAuth", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "targets", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "targetClaims", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "resultConnectionIds", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "results", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorCode", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "consumedAt", + "entityType": "columns", + "schema": "public", + "table": "ConnectSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "displayName", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'connected'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "statusReason", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "authExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connectedAt", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "Connection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "avatar", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumber", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "emailVerified", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "emailOptIn", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstName", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastName", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "CASE\n WHEN \"firstName\" IS NULL AND \"lastName\" IS NULL THEN NULL\n WHEN \"firstName\" IS NULL THEN \"lastName\"\n WHEN \"lastName\" IS NULL THEN \"firstName\"\n ELSE \"firstName\" || ' ' || \"lastName\"\n END", + "type": "stored" + }, + "identity": null, + "name": "fullName", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "gender", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "gender", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastReadAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ref", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "country", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "city", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "location", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "locale", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subscribedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastSubscribedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "blockedAt", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalTagged", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalNewTagged", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Contact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hourBucket", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceMacId", + "entityType": "columns", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "contactActivityType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "activityType", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "contactActivityReferenceType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referenceType", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentReferenceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referenceId", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstOccurredAt", + "entityType": "columns", + "schema": "public", + "table": "ContactActivity" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "ContactCustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "originalContactId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "followsBusiness", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessFollowsContact", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountVerified", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "followerCount", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "contactInboxProfileSnapshotState", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "profileSnapshotState", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "profileSnapshotAttempts", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "profileSnapshotNextAttemptAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "personaId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactLastReadAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstInteractionAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastIncomingMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastOutboundMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referral", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastCommentMessageId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastCommentMessageAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "consecutiveFailedReply", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastInputFailure", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastErrorLog", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastBtnTitle", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUserInput", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "lastUserInputType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUserInputType", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webchatParentUrl", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceUserId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceParentUserId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceUsername", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceIdentityHistory", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "threadControlState", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlState", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadOwnerRole", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlUpdatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "threadControlEvent", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlLastEvent", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadOwnerAppId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadOwnerExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadPreviousOwnerAppId", + "entityType": "columns", + "schema": "public", + "table": "ContactInbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactInboxPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactInboxPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "postId", + "entityType": "columns", + "schema": "public", + "table": "ContactInboxPost" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "commentedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactInboxPost" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automatedResponseId", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "normalizedText", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdById", + "entityType": "columns", + "schema": "public", + "table": "ContactNote" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "broadcastId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "sent", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "case when \"seenAt\" is null then false when \"deliveredAt\" is null then false else \"seenAt\" >= \"deliveredAt\" end", + "type": "stored" + }, + "identity": null, + "name": "isRead", + "entityType": "columns", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "enrolledAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextRunAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastStepId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextStepId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockedAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockOwner", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appointmentId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "ContactOnSmartDelayType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerAt", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "ContactOnSmartDelayStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ContactState" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactState" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastDeliveredAt", + "entityType": "columns", + "schema": "public", + "table": "ContactState" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagChannelId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "botEnabled", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botResumeAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "archivedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "additionalAttributes", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactLastReadAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agentLastReadAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiContextLastMessageId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastActivityAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "followed", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedUserId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedInboxTeamId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastStep", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentStep", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adminRepliedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactRepliedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "awaitingHumanReplySince", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "awaitingHumanReplyClosedAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "assignedUserAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseDueAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseSlaBreachingAt", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "responseSlaTargetSeconds", + "entityType": "columns", + "schema": "public", + "table": "Conversation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "topicId", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuedContactId", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuedAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "usedAt", + "entityType": "columns", + "schema": "public", + "table": "Coupon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "couponTopicStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasEverHadCoupon", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdById", + "entityType": "columns", + "schema": "public", + "table": "CouponTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "customFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "showInInbox", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "CustomField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "DecisionProviderKind", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "providerKind", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endpoint", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credential", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "modelCatalog", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultModel", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "DecisionConnectionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'enabled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "DecisionConnectionTestStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastTestStatus", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastTestedAt", + "entityType": "columns", + "schema": "public", + "table": "DecisionConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "DecisionProfileStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'enabled'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connectionId", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contract", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thresholdConfig", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "globalRouterEnabled", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "globalRouterConfig", + "entityType": "columns", + "schema": "public", + "table": "DecisionProfile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoApply", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "discountType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountType", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "discountValue", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "discountAppliesTo", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'entireOrder'", + "generated": null, + "identity": null, + "name": "appliesTo", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productIds", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "discountMinimumType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'none'", + "generated": null, + "identity": null, + "name": "minimumType", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "minimumValue", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "usageLimit", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "usedCount", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "oncePerCustomer", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "discountEligibility", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'everyone'", + "generated": null, + "identity": null, + "name": "eligibility", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerFilter", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "startsAt", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endsAt", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "DiscountCode" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "data", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "backgroundUrl", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "DynamicImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ranges", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOrderCounter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "lastNumber", + "entityType": "columns", + "schema": "public", + "table": "EcommerceOrderCounter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderingAvailable", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "webshopProductView", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webshopProductView", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openHoursId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "searchProducts", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "facebookPixelId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "abandonedCartDelayMinutes", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "abandonedCartFlowId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productButtons", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "productImageSize", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productImageSize", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "allowRateOrders", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "notifyOnCartStatusChange", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "paymentMethods", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "currencyPosition", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencyPosition", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencySymbol", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "serviceFeePercent", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "shippingMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingType", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeAddress", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingCountries", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultShippingCountry", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveryCost", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "checkoutMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "checkoutMode", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "checkoutLink", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "checkoutFlowId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minimumOrderValue", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "orderConfirmationMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'default'", + "generated": null, + "identity": null, + "name": "orderConfirmationMode", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderConfirmationFlowId", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireName", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireEmail", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requirePhone", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireState", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requireZip", + "entityType": "columns", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sendsTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "deliveredsTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "seensTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "clicksTotal", + "entityType": "columns", + "schema": "public", + "table": "EmailTopic" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "detail", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ipAddress", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "AuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "domain", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verifiedAt", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfHostnameId", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfOwnershipValue", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cfAcmeValue", + "entityType": "columns", + "schema": "public", + "table": "CustomDomain" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "License" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "License" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "License" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "licenseId", + "entityType": "columns", + "schema": "public", + "table": "License" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "License" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "License" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'super-admin'", + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disabledReason", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brandName", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logoLightPath", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logoDarkPath", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "faviconPath", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customCss", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customJs", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "theme", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storageUrl", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "policyUrl", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "termsOfServiceUrl", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "signupEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "forgotPasswordEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "magicLinkEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "accountCredentialsEmailTemplate", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hiddenChannels", + "entityType": "columns", + "schema": "public", + "table": "Tenant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "icon", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactsLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "contactsUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspacesLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "workspacesUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelsLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "channelsUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "teamMembersLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "teamMembersUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "macLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botMessagesLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "monthlyBotMessagesLimit", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "monthlyBotMessagesUsed", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "monthlyBotMessagesPeriodStart", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesTopUpGranted", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "whiteLabel", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "ssoSaml", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "saasMode", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "planName", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "planStatus", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "selectedTrialPlanId", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelsTornDownAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "syncedAt", + "entityType": "columns", + "schema": "public", + "table": "UserQuota" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "contactsUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "channelsUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "teamMembersUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "botMessagesUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macUsed", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "syncedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "detail", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "httpCode", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stackTrace", + "entityType": "columns", + "schema": "public", + "table": "ErrorLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'make'", + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "event", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageName", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formName", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "fieldMapping", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "leadsHandledCount", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automationId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leadgenId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencyOffset", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "budgetType", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "budgetMinorUnits", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "campaignId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "facebookUserId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "facebookUserId", + "entityType": "columns", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "fileContextType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contextType", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subType", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileName", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileSize", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "fileStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "meta", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadedAt", + "entityType": "columns", + "schema": "public", + "table": "File" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enableInInbox", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentVersionId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "draftVersionId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Flow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "analyticsId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nodeId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "buttonId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventType", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refId", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refType", + "entityType": "columns", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "FlowRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "nodes", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "edges", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isDraft", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isLatest", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startNodeId", + "entityType": "columns", + "schema": "public", + "table": "FlowVersion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "folderType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderType", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isTrash", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "paths", + "entityType": "columns", + "schema": "public", + "table": "Folder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationGoogleAdsId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "loginCustomerId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionCustomerId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionName", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionCategory", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lookbackWindowDays", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "googleAdsEventSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scopeId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "googleAdsClickIdType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickIdType", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "googleClickReceivedAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transactionId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "options", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadMethod", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "googleAdsEventStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimedAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requestId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sentAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "googleAdsFailureStage", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failureStage", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "googleAdsProcessingStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingStatus", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingAttempts", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextProcessingCheckAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processingDetail", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "settings", + "entityType": "columns", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "igStoryAutomationType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "igStoryAutomationTrigger", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'storyReply'", + "generated": null, + "identity": null, + "name": "trigger", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "repliesCount", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "story", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"none\",\"value\":null}'", + "generated": null, + "identity": null, + "name": "reply", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{\"type\":\"all\",\"value\":[]}'", + "generated": null, + "identity": null, + "name": "includeKeywords", + "entityType": "columns", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileId", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "importType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "importFormat", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "format", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "importStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "meta", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "processedCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "errorSample", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "Import" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxResolution", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "identifiers", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fieldMappings", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actions", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sampleJson", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "requestCount", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboundWebhookId", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idempotencyKey", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clientIp", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userAgent", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "inboundWebhookRequestStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'received'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimToken", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimedAt", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "skipReason", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorCode", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fieldErrors", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actionResults", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'connected'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "markReadOnOutbound", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "disconnectReason", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadControlSeenAt", + "entityType": "columns", + "schema": "public", + "table": "Inbox" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "InboxContactStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalContacts", + "entityType": "columns", + "schema": "public", + "table": "InboxContactStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboxContactStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "InboxTeam" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxTeamId", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenHash", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenPrefix", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callbackUrl", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationApi" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationType", + "entityType": "columns", + "schema": "public", + "table": "Integration" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "loginCustomerId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "descriptiveName", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currencyCode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionCustomerId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "acceptedCustomerDataTerms", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActions", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversionActionsSyncedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "setupError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "setupErrorAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'primary'", + "generated": null, + "identity": null, + "name": "providerCalendarId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userInfo", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "igId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "username", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistAiReadsSyncedHistory", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiTestEventCode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'instagram'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userInfo", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "personas", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "personaId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistAiReadsSyncedHistory", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiTestEventCode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "syncTagEnabledAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handoverResumeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogName", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAuth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "metaCatalogAuthMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'oauth'", + "generated": null, + "identity": null, + "name": "authMode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "metaCatalogConnectionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "metaCatalogImportStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'idle'", + "generated": null, + "identity": null, + "name": "importStatus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importTotalCount", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importedCount", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "importFailedCount", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "importError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastImportedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'VND'", + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeUrl", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReplyVoice", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "voice", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiAgentId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "baseURL", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultModel", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "preset", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoReply", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "maxOutputTokens", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prompt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "temperature", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'primary'", + "generated": null, + "identity": null, + "name": "providerCalendarId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromAddress", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "threadsUserId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "username", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enable", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "authorizedDomains", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "conversationStarters", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "persistentMenus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "brandColor", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hideHeader", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "showLogo", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hideMessageInput", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customCss", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "welcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumberId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "displayPhoneNumber", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callingEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "inboundCallsEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callHours", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "callRecordingEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "90", + "generated": null, + "identity": null, + "name": "callRecordingRetentionDays", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "callTranscriptionEnabled", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "whatsappCallRecordingMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'metaNative'", + "generated": null, + "identity": null, + "name": "callRecordingMode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "whatsappCallTranscriptionMode", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'metaNative'", + "generated": null, + "identity": null, + "name": "callTranscriptionMode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callAnnouncementLanguage", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "callRecordingPurpose", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "coexistAiReadsSyncedHistory", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isCoexist", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "platformType", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "historyDeclined", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "hasCapiScope", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiScopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "datasetId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiAccessToken", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiDisconnectedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiTestEventCode", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "whatsappRegistrationStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending_verification'", + "generated": null, + "identity": null, + "name": "registrationStatus", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "registrationError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verificationCodeRequestedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handoverResumeFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "oaId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fallbackFlowId", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "syncTagEnabledAt", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenRefreshError", + "entityType": "columns", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "coverImageUrl", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startsAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endsAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "leaderboardStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'draft'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "leaderboardPlatform", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "platform", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minigameId", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rules", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "followersOnly", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagIds", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'22:00'", + "generated": null, + "identity": null, + "name": "resetTime", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "cooldownSeconds", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referralWelcomeFlowId", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rewardSettings", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rewardsTriggeredAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rewardRecipients", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Leaderboard" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leaderboardId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "leaderboardAuditAction", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "action", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "delta", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorUserId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leaderboardId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "score", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isBanned", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referrerContactId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "scoredAt", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "date", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dailyBucket", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "dailyCounts", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "breakdown", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastActivityAt", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "leaderboardId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delta", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "leaderboardScoreSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rule", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceRef", + "entityType": "columns", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "MagicLink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linkId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isFavourite", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastAccessedAt", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentAttributes", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "messageType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageType", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "contentType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentType", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "senderType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderType", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "senderId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "messageKind", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'message'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attributes", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendError", + "entityType": "columns", + "schema": "public", + "table": "Message" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationIds", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sinceTime", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "MessageCleanupStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns", + "schema": "public", + "table": "MessageCleanup" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "messagingAdChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "adAccountId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "messagingAdCreateState", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "createState", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "messagingAdPublishState", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'draft'", + "generated": null, + "identity": null, + "name": "publishState", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaCampaignId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaAdSetId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaAdCreativeId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaAdId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "input", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cleanupError", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "messagingAdChannel", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationInstagramId", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "auth", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'active'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'POSITIONAL'", + "generated": null, + "identity": null, + "name": "parameterFormat", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "components", + "entityType": "columns", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMessengerId", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pageId", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metaFlowId", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowVersionId", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'current'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "eventName", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentCategory", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentName", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "numeric", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'business_messaging'", + "generated": null, + "identity": null, + "name": "actionSource", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentType", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contentIds", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceKey", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "capiStatus", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiSentAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "capiError", + "entityType": "columns", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMetaCatalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "metaCatalogItemDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'push'", + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retailerId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedFingerprint", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastSyncedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationMetaCatalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "metaCatalogSyncStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'queued'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "metaCatalogItemDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'push'", + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "catalogId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "metaCatalogSyncScope", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'all'", + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "selectedProductIds", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "handles", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionLeaseId", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "succeededCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failedCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "skippedCount", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "itemErrors", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "skippedItems", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "pollAttempt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "finishedAt", + "entityType": "columns", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "definition", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowJson", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "submissionsCount", + "entityType": "columns", + "schema": "public", + "table": "MiniApp" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "miniAppId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "whatsappFlowId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "validationErrors", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publishedAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "miniAppId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "miniAppSubmissionSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "answers", + "entityType": "columns", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "miniAppId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionId", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inputName", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "uploadToken", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fileName", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mimeType", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "miniAppUploadStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "minigameType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "generalSettings", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "appearance", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "playerSettings", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prizeSettings", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "winningMessageSettings", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nonWinningMessageSettings", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "playsCount", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "participantsCount", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "winnersCount", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sharesCount", + "entityType": "columns", + "schema": "public", + "table": "Minigame" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minigameId", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openedAt", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "played", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "remaining", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "sharesCount", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "referrerContactId", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "MinigameContact" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "minigameId", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "isWinning", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prizeId", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "prizeName", + "entityType": "columns", + "schema": "public", + "table": "MinigamePlay" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCodeId", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "amount", + "entityType": "columns", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "variantId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendorId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "variantLabel", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "combination", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sku", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retailerId", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendorName", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "unitPrice", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "quantity", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "stockTaken", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountPercent", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "taxPercent", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountTotal", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "taxTotal", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lineTotal", + "entityType": "columns", + "schema": "public", + "table": "OrderItem" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channel", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "orderSource", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "orderStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "paymentMethod", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'cod'", + "generated": null, + "identity": null, + "name": "paymentMethod", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "paymentStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'unpaid'", + "generated": null, + "identity": null, + "name": "paymentStatus", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subtotal", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountTotal", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingTotal", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "serviceFeeTotal", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "taxTotal", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "couponDiscount", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "total", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCodeId", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "discountCode", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerName", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerEmail", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customerPhone", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "shippingType", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingType", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippingAddress", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "note", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rating", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ratingComment", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "acceptedAt", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shippedAt", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "concludedAt", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelReason", + "entityType": "columns", + "schema": "public", + "table": "Order" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "orderId", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "orderStatus", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fromStatus", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "orderStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "toStatus", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "orderActorType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorType", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actorUserId", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "note", + "entityType": "columns", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publicConfig", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "livemode", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "usePlatformCredential", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isVerified", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "verifiedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastUsedAt", + "entityType": "columns", + "schema": "public", + "table": "PlatformCredential" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortDescription", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "longDescription", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "price", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "taxes", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "discount", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'USD'", + "generated": null, + "identity": null, + "name": "currency", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productUrl", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sku", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "inventoryPolicy", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'dont_track'", + "generated": null, + "identity": null, + "name": "inventoryPolicy", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "inventoryQuantity", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowOutOfStockPurchase", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "images", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "tags", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "vendorId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subcategoryId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isSearchable", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "allowSpecialRequest", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isAddonOnly", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Product" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "maxSelections", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "addonProductIds", + "entityType": "columns", + "schema": "public", + "table": "ProductAddon" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parentId", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isVisible", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns", + "schema": "public", + "table": "ProductCategory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "combination", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "double precision", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "price", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isEnabled", + "entityType": "columns", + "schema": "public", + "table": "ProductVariant" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "productId", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "values", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "submissionId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionIdSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionTitleSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionTypeSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "labelSnapshot", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pointsEarned", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "attemptCount", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "answeredAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enableScore", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "enableRetryMessages", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enableCustomFieldMapping", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerFlowId", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Questionnaire" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionnaireId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "questionnaireQuestionType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "orderNo", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "point", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "retryMessage", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "systemFieldKey", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "config", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "questionnaireId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "questionnaireSubmissionStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'inProgress'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "totalPoints", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentQuestionId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "currentQuestionSentAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastAnsweredMessageId", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cancelledAt", + "entityType": "columns", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linkId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "occurredAt", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "RefLinkStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "ReflinkType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'refLink'", + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "customFieldId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "qrStyles", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "widgetAuthorizedDomains", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "ARRAY[]", + "generated": null, + "identity": null, + "name": "widgetHiddenInboxIds", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetLogoFileId", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetBrandName", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetBrandUrl", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "widgetLogoBackgroundColor", + "entityType": "columns", + "schema": "public", + "table": "Reflink" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstResponseTargetSeconds", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nextResponseTargetSeconds", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "25", + "generated": null, + "identity": null, + "name": "breachingThresholdPercent", + "entityType": "columns", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortcut", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "text", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "SavedReply" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "savedReplyId", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mediaLibraryFileId", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "subscribers", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "messages", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Sequence" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "runAtMs", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "bucket", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idempotencyKey", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lockOwner", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deliveredAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "seenAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "clickedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorContent", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "stepId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "enrollmentId", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": { + "as": "case when \"seenAt\" is null then false when \"deliveredAt\" is null then false else \"seenAt\" >= \"deliveredAt\" end", + "type": "stored" + }, + "identity": null, + "name": "isRead", + "entityType": "columns", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "order", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delayDays", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "delayMinutes", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "delayUnit", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "specificDateTime", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "anytime", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendTimeStart", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sendTimeEnd", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "'[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\",\"sunday\"]'", + "generated": null, + "identity": null, + "name": "sendDays", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "flowId", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sequenceId", + "entityType": "columns", + "schema": "public", + "table": "SequenceStep" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "spreadsheetId", + "entityType": "columns", + "schema": "public", + "table": "Spreadsheet" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "SystemFieldType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "SystemField" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Tag" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tagId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "channelType", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "externalLabelId", + "entityType": "columns", + "schema": "public", + "table": "TagChannel" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "chatId", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "telegramChatType", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "telegramBotChatStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "botStatus", + "entityType": "columns", + "schema": "public", + "table": "TelegramChat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "publisherName", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "youtubeVideoId", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "testLink", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "selection", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryCounts", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formatVersion", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shareToken", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "shareEnabled", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shareExpiresAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultPermissions", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "createInstallFolder", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "defaultAutoUpdate", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "installCount", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "createdBy", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletedAt", + "entityType": "columns", + "schema": "public", + "table": "Template" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "templateName", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceWorkspaceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "formatVersion", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "templateInstallationStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "warnings", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "warningCount", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "errorMessage", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "resourceCount", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installFolderId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "autoUpdate", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceUpdatedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installedBy", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "installationId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "templateResourceCategory", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resourceKind", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resourceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceResourceId", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "wasExisting", + "entityType": "columns", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "", + "generated": null, + "identity": null, + "name": "actions", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Trigger" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webhookId", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "varchar(255)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "operator", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "public", + "table": "Condition" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "firstEnteredAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "executedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TriggerExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "triggerId", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalContacts", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successCount", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failureCount", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "totalExecutions", + "entityType": "columns", + "schema": "public", + "table": "TriggerStat" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "devicePlatform", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "platform", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "lastSeenAt", + "entityType": "columns", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "", + "generated": null, + "identity": null, + "name": "menus", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortDescription", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phone", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "storeAddress", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "imageUrl", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "discountPercent", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "numeric(19,4)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'0'", + "generated": null, + "identity": null, + "name": "minimumOrderValue", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "openHoursId", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "categoryId", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "subcategoryId", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "10", + "generated": null, + "identity": null, + "name": "rank", + "entityType": "columns", + "schema": "public", + "table": "Vendor" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "active", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "folderId", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "Webhook" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "executedAt", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "webhookId", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactId", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WebhookExecution" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credential", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "grantedScopes", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scopeCheckedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provisionedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "creditLineId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wacid", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attemptId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "whatsappCallDirection", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "direction", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "whatsappCallStatus", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'ringing'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "whatsappCallOutcome", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outcome", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "durationSeconds", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "messageId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "lastError", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "answeredByUserId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "initiatedByUserId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordingRequested", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordingFailureReason", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordingPath", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "recordedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transcript", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transcribedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "transcriptSegments", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiSummary", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiSummarizedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "aiSummaryProvider", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inboxId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversationId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCall" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "whatsappCallPermissionResponse", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "response", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isPermanent", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "respondedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "contactInboxId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "phoneNumberId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payload", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "payloadHash", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "parseFailedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "categories", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "validationErrors", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "completedCount", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "screens", + "entityType": "columns", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "integrationWhatsappId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sourceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'[]'", + "generated": null, + "identity": null, + "name": "components", + "entityType": "columns", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wabaId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "businessId", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedAccessToken", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "apiVersion", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "candidatePhoneNumberIds", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "claimedPhoneNumberIds", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expiresAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "consumedAt", + "entityType": "columns", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkingHours" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHours" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHours" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHours" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WorkingHours" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "date", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "date", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ranges", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "weekday", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startMinute", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endMinute", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workingHoursId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "defaultReply", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "defaultReplyFrequency", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'allTime'", + "generated": null, + "identity": null, + "name": "defaultReplyFrequency", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "targetCountry", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'en'", + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'UTC'", + "generated": null, + "identity": null, + "name": "timezone", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'#016DFF'", + "generated": null, + "identity": null, + "name": "brandColor", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "developmentMode", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "smartResponseDelaySeconds", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "isActive", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "startTime", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "endTime", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logo", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scheduledDeletionAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletionRequestedById", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletionRequestedAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purgeStartedAt", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "supportAccessUntil", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "capiLimitedDataUse", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "Workspace" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "WorkspaceApiTokenPermission", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permission", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenHash", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tokenPrefix", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "isDefault", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "encryptedToken", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "scopes", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "count", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceName", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerEmail", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletionRequestedById", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletionRequestedByEmail", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deletionRequestedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scheduledDeletionAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "purgedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "usageSnapshot", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "details", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ownerId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tenantId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodStart", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "periodEnd", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "macCount", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "createdAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updatedAt", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "workspaceId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "userId", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "workspaceMemberRole", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notificationChannels", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notificationTypes", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "permissions", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "type": "timestamp(6) with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "onlineSince", + "entityType": "columns", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "isActive", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageShard_isActive_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageShard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "shardKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageShard_shardKey_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageShard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "startTime", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "endTime", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ShardTimeRange_time_lookup_idx", + "entityType": "indexes", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "shardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ShardTimeRange_shardId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspace_integration_source_sourceEventId_key", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"channel\" = 'whatsapp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_ws_whatsapp_source_sourceEventId_key", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"channel\" = 'messenger'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_ws_messenger_source_sourceEventId_key", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationInstagramId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "source", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceEventId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"channel\" = 'instagram'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_ws_instagram_source_sourceEventId_key", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionEvent_workspaceId_adId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "enabled", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AdsConversionRule_workspaceId_channel_enabled_idx", + "entityType": "indexes", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIAgent_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIAgent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_sourceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "chunkIndex", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_sourceId_chunkIndex_key", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "embedding", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "vector_cosine_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "hnsw", + "concurrently": false, + "name": "AIConversationEmbedding_embedding_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationEmbedding_lookup_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_lookup_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_workspaceId_sourceType_sourceKey_key", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "messageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_messageId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIConversationSource_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIEmbedding_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "aiFileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIEmbedding_aiFileId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIFile_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIFile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "status IN ('pending', 'running', 'cancelling')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_inbox_live_uq", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "revision", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_inbox_revision_uq", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_workspace_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "\"createdAt\" DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_inbox_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastHeartbeatAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('pending', 'running', 'cancelling')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_live_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "requestedByUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverBulkRun_requestedByUserId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "applyToAllRequestedByUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_applyToAllRequestedByUserId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "gotoFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AIHandoverSettings_gotoFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsAgentResponseEvent_workspaceId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "aiProvider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_aiProvider_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "hasResponse", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "result", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBotMessageEvent_workspaceId_hasResponse_result_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsBroadcastEvent_workspaceId_broadcastId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adminId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsContactEvent_workspaceId_adminId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsConversationEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "toAssignee", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsConversationEvent_workspaceId_toAssignee_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsFlowNodeEvent_workspaceId_flowId_analyticsId_nodeId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "buttonId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsFlowNodeEvent_workspaceId_flowId_analyticsId_nodeId_buttonId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_occurredAt_eventType_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "adminId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_adminId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "senderType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsMessageEvent_workspaceId_senderType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsSequenceEvent_workspaceId_sequenceId_stepId_eventType_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_token_key", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_topicId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_workspaceId_topicId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"contactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"conversationId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"contactInboxId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsEmailTopic_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "objectKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AnalyticsManifestStatus_objectKey_key", + "entityType": "indexes", + "schema": "public", + "table": "AnalyticsManifestStatus" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "startAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_workspaceId_startAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "startAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_calendarId_status_startAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Appointment_contactId_calendarId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "publicLinkSlug", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendar_publicLinkSlug_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendarAvailability_calendarId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "calendarId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "timingValue", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "timingUnit", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentCalendarReminder_dedupe_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "jobId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_jobId_key", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sendAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_status_sendAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "appointmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_appointmentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AppointmentReminderDispatch_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "messageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "messageCreatedAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_message_idx", + "entityType": "indexes", + "schema": "public", + "table": "Attachment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_workspaceId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Attachment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Attachment_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Attachment" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "providerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "accountId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Account_providerId_accountId_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Account" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Invitation_code_key", + "entityType": "indexes", + "schema": "public", + "table": "Invitation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Session_token_key", + "entityType": "indexes", + "schema": "public", + "table": "Session" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "User_email_tenant_key", + "entityType": "indexes", + "schema": "public", + "table": "User" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "User_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "User" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomatedResponse_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lastTriggeredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomationThrottle_lastTriggeredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AutomationThrottle_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BotField_workspaceId_type_name_key", + "entityType": "indexes", + "schema": "public", + "table": "BotField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" IN ('scheduled', 'sending') AND \"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_workspaceId_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_channel_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "schedulesAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_schedulesAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"deletedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_deletedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "parentBroadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurrenceAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Broadcast_parentBroadcastId_occurrenceAt_key", + "entityType": "indexes", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrence_broadcastId_key", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrence_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"nextRunAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrence_due_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "recurrenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "localSlot", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurrenceAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_recurrenceId_localSlot_occurrenceAt_key", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "recurrenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurrenceAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_recurrenceId_occurrenceAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "childBroadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastRecurrenceOccurrence_childBroadcastId_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastTarget_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "BroadcastTarget_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_workspaceId_contactId_key", + "entityType": "indexes", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lastActivityAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"abandonedNotifiedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Cart_abandoned_scan_idx", + "entityType": "indexes", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "externalPostId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ChannelPost_workspaceId_channel_externalPostId_key", + "entityType": "indexes", + "schema": "public", + "table": "ChannelPost" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "COALESCE(\"publishedAt\", \"createdAt\") DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ChannelPost_workspaceId_sortAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "ChannelPost" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ChannelPost_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ChannelPost" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_workspace_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastHeartbeatAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('init', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "\"startedAt\" DESC", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "status IN ('succeeded', 'partial')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_resume_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "status = 'init' AND type = 'coexist'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_integration_init_uq", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "type = 'contact_scan' AND status IN ('init', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_contact_scan_active_uq", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "type = 'contact_scan'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CoexistSyncRun_contact_scan_due_idx", + "entityType": "indexes", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomation_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomation_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "commentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "replyChannel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_dedup_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_automation_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"replyChannel\" = 'private' AND \"deliveredAt\" IS NOT NULL AND \"seenAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_private_unseen_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'failed'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationEvent_failed_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "commentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_dedup_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_automation_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationMiss_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "postId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationReply_dedup_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationReply_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CommentAutomationReply_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_expiresAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "consumedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"consumedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_consumedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "stateNonceHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConnectSession_stateNonceHash_key", + "entityType": "indexes", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "provider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_workspaceId_provider_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "provider", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_provider_sourceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Connection_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "broadcastSubscribedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_broadcast_subscribed_at", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_created_at", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_email", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "phoneNumber", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_phone_number", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "md5(btrim(regexp_replace(\"fullName\", '[ \\t\\n\\v\\f\\r]+', ' ', 'g')))", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_workspace_full_name_md5", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "firstName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_firstName_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "lastName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_lastName_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_email_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumber", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "Contact_phoneNumber_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "activityType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "referenceType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "parentReferenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "referenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactActivity_reference_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactActivity" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactCustomField_contactId_customFieldId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactCustomField_customFieldId_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceUserId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceUserId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceParentUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceParentUserId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_sourceParentUserId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "profileSnapshotNextAttemptAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"profileSnapshotState\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_profileSnapshot_pending_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"threadControlState\" = 'standby' AND \"threadOwnerRole\" = 'ai_agent'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_inboxId_id_ai_held_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastIncomingMessageAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_contactId_lastIncomingMessageAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastOutboundMessageAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_contactId_lastOutboundMessageAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "(\"referral\"->>'ctwaClid')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referral\"->>'ctwaClid' IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_referral_ctwaClid_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "(\"referral\"->>'adId')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referral\"->>'adId' IS NOT NULL AND \"referral\"->>'source' = 'ADS'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInbox_referral_adId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "postId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactInboxPost_workspaceId_postId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactInboxPost" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "normalizedText", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "ContactKeywordMessage_text_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "normalizedText", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "text_pattern_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactKeywordMessage_text_prefix_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactNote_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactNote" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_on_broadcast_contact_id", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnBroadcast_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnBroadcast_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "isRead", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "idx_contact_on_broadcast_is_read", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "broadcastId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"sent\" = false AND \"failedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnBroadcast_unsent_order_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_sequenceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_status_nextRunAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextRunAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_workspaceId_status_nextRunAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactsOnSequence_contactId_sequenceId_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_workspaceId_flowId_contactInboxId_stepId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "triggerAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_status_triggerAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "appointmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_appointmentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" NOT IN ('completed', 'failed', 'canceled') AND \"type\" = 'followUp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_followUp_active_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" NOT IN ('completed', 'failed', 'canceled') AND \"type\" = 'quickReplyFollowUp'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactOnSmartDelay_quickReplyFollowUp_active_key", + "entityType": "indexes", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastDeliveredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"lastDeliveredAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactState_lastDeliveredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactState" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTag_tagId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactToTag" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTagChannel_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ContactToTagChannel_tagId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"sourceId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_dm_key", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "responseDueAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"responseDueAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_workspaceId_responseDueAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "aiContextLastMessageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_aiContextLastMessageId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lastActivityAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Conversation_workspaceId_lastActivityAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ConversationParticipant_conversationId_userId_key", + "entityType": "indexes", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_code_key", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"issuedContactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_key", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_issuedContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "issuedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_issuedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "usedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_usedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "code", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_code_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "topicId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "issuedContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "usedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Coupon_workspaceId_topicId_issuedContactId_usedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_status_deletedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_expiresAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "CouponTopic_workspaceId_name_idx", + "entityType": "indexes", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomField_workspaceId_type_name_key", + "entityType": "indexes", + "schema": "public", + "table": "CustomField" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionConnection_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "DecisionConnection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionConnection_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "DecisionConnection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "DecisionProfile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "connectionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_connectionId_idx", + "entityType": "indexes", + "schema": "public", + "table": "DecisionProfile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "DecisionProfile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"globalRouterEnabled\" = true", + "with": "", + "method": "btree", + "concurrently": false, + "name": "DecisionProfile_workspaceId_globalRouter_key", + "entityType": "indexes", + "schema": "public", + "table": "DecisionProfile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"code\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCode_workspaceId_code_key", + "entityType": "indexes", + "schema": "public", + "table": "DiscountCode" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCode_categoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "DiscountCode" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DynamicImage_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "DynamicImage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceOpenHours_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "openHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_openHoursId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "abandonedCartFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_abandonedCartFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "checkoutFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_checkoutFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderConfirmationFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EcommerceSettings_orderConfirmationFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EmailTopic_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "EmailTopic_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AuditLog_workspaceId_createdAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"userId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "AuditLog_workspaceId_userId_createdAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "AuditLog_createdAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_tenantId_key", + "entityType": "indexes", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "domain", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_domain_key", + "entityType": "indexes", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "CustomDomain_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "licenseId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "License_licenseId_key", + "entityType": "indexes", + "schema": "public", + "table": "License" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformAdmin_userId_key", + "entityType": "indexes", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "ownerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tenant_ownerId_key", + "entityType": "indexes", + "schema": "public", + "table": "Tenant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "position", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TenantHelpItem_tenantId_position_idx", + "entityType": "indexes", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channelsTornDownAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserQuota_channelsTornDownAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserQuota" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"channelsTornDownAt\" IS NULL AND \"planStatus\" = 'trial'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserQuota_due_expired_trial_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserQuota" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ErrorLog_workspaceId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ErrorLog_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ErrorLog_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "event", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ExternalWebhook_workspaceId_event_idx", + "entityType": "indexes", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "event", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "url", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ExternalWebhook_workspaceId_event_url_key", + "entityType": "indexes", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "pageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "formId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsAutomation_workspaceId_pageId_formId_key", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "automationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "leadgenId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_automationId_leadgenId_key", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leadgenId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_leadgenId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"contactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookLeadAdsLead_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookMarketingMessage_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "campaignId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookMarketingMessage_campaignId_key", + "entityType": "indexes", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FacebookMarketingMessagesAuth_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "path", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_path_key", + "entityType": "indexes", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contextType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_workspaceId_contextType_idx", + "entityType": "indexes", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "subType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "File_workspaceId_subType_idx", + "entityType": "indexes", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Flow_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Flow" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"deletedAt\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowAnalyticsSession_workspaceId_flowId_key", + "entityType": "indexes", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowAnalyticsSession_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowAnalyticsSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "eventType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "buttonId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowNodeStat_filter_1_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "analyticsId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"eventType\" = 'seen' AND \"seenAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowNodeStat_filter_2_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowRun_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowRun_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowRun_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowVersionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowRun_flowVersionId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowVersion_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowVersion" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "FlowVersion_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "FlowVersion" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Folder_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Folder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Folder_parentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Folder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "transactionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_workspaceId_transactionId_key", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_workspaceId_occurredAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "nextProcessingCheckAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_status_nextProcessingCheckAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "claimedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsConversionEvent_status_claimedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "GoogleAdsSettings_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IgStoryAutomation_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_workspaceId_type_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_inboxId_type_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "fileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_fileId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"type\" = 'products' AND \"status\" IN ('pending', 'processing')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Import_products_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhook_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "token", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhook_token_key", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboundWebhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "idempotencyKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"idempotencyKey\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_inboundWebhookId_idempotencyKey_key", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboundWebhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_inboundWebhookId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'received'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_createdAt_received_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "claimedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'processing'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_claimedAt_processing_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboundWebhookRequest_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Inbox_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Inbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Inbox_workspaceId_channel_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "Inbox" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "InboxTeam_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "InboxTeam" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationActiveCampaign_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationActiveCampaign_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationApi_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationApi" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationApi_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationApi" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tokenHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationApi_tokenHash_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationApi" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Integration_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Integration" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Integration_workspaceId_integrationType_key", + "entityType": "indexes", + "schema": "public", + "table": "Integration" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationClaude_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationClaude_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDeepseek_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDeepseek_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDrip_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationDrip_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationFacebookAds_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationFacebookAds_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGemini_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGemini_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGetResponse_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGetResponse_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleAds_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleAds_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleCalendar_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationGoogleSheet_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_welcomeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "igId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationInstagram_igId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationKlaviyo_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationKlaviyo_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailchimp_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailchimp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailerLite_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMailerLite_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_welcomeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "handoverResumeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_handoverResumeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "pageId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMessenger_pageId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "deletedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMetaCatalog_deletedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMoosend_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationMoosend_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenAI_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenAI_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "preset", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"preset\" <> 'custom'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenaiCompatible_workspaceId_preset_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenrouter_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOpenrouter_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationOutlookCalendar_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSendGrid_integrationId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSendGrid_workspaceId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSmtp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationSmtp_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "botId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTelegram_botId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationThreads_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationThreads_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "threadsUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationThreads_threadsUserId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "openId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationTiktok_openId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "welcomeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWebchat_welcomeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "handoverResumeFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_handoverResumeFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationWhatsapp_phoneNumberId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "fallbackFlowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_fallbackFlowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "oaId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_oaId_idx", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "IntegrationZalo_inboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Leaderboard_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Leaderboard_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Leaderboard_minigameId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardAuditLog_leaderboardId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardAuditLog_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "score", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "scoredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "NOT \"isBanned\"", + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_ranking_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "referrerContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_leaderboardId_referrerContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "referrerContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referrerContactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardParticipant_referrerContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardScoreEvent_leaderboardId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "leaderboardId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardScoreEvent_leaderboardId_contactId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "LeaderboardScoreEvent_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLink_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "MagicLink" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLink_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MagicLink" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "linkId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MagicLinkStat_workspaceId_linkId_occurredAt_contactInboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MediaLibraryFile_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MediaLibraryFile_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MediaLibraryFolder_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_conversation_history_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_workspace_created_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_contactInboxId_sourceId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_conversationId_type_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"parentId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Message_parentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_inboxId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessageCleanup" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_status_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageCleanup" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessageCleanup_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessageCleanup" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_integrationWhatsappId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_integrationMessengerId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationInstagramId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdOperation_integrationInstagramId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_integrationWhatsappId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_integrationMessengerId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationInstagramId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessagingAdsConnection_integrationInstagramId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerMessageTemplate_integrationMessengerId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerWelcomeMessageFlow_workspaceId_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerWelcomeMessageFlow_integrationMessengerId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationMessengerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" = 'current'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MessengerWelcomeMessageFlow_current_key", + "entityType": "indexes", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_workspaceId_channel_sourceKey_key", + "entityType": "indexes", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channel", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCapiEvent_channel_integrationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMetaCatalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "catalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "retailerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_integration_retailer_key", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationMetaCatalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "catalogId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_integration_product_key", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogItem_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" IN ('queued', 'running')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MetaCatalogSyncRun_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniApp_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MiniApp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniApp_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "MiniApp" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "miniAppId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppPublication_miniAppId_integrationWhatsappId_key", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "miniAppId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": true, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppSubmission_miniAppId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppSubmission_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "uploadToken", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_uploadToken_key", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "path", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_path_key", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "miniAppId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "inputName", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_miniAppId_inputName_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "submissionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_submissionId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"contactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MiniAppUpload_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Minigame_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Minigame" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Minigame_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Minigame" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_minigameId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_minigameId_contactId_key", + "entityType": "indexes", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "referrerContactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"referrerContactId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_referrerContactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"contactInboxId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigameContact_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "minigameId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigamePlay_minigameId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MinigamePlay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "MinigamePlay_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "MinigamePlay" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCodeRedemption_orderId_key", + "entityType": "indexes", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "discountCodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCodeRedemption_discountCodeId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "DiscountCodeRedemption_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_orderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_workspaceId_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "vendorId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_workspaceId_vendorId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "variantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_variantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderItem_categoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "number", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_workspaceId_number_key", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_workspaceId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_inboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "discountCodeId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Order_discountCodeId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "orderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderStatusHistory_orderId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderStatusHistory_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "actorUserId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "OrderStatusHistory_actorUserId_idx", + "entityType": "indexes", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "livemode", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"userId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_user_type_livemode_key", + "entityType": "indexes", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "livemode", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"userId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_platform_type_livemode_key", + "entityType": "indexes", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "PlatformCredential_userId_idx", + "entityType": "indexes", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_categoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "subcategoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_subcategoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "vendorId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Product_vendorId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductAddon_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductAddon" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductCategory_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "parentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductCategory_parentId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductVariant_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductVariant" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "productId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "ProductVariantOption_productId_idx", + "entityType": "indexes", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "submissionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "questionIdSnapshot", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireAnswer_submissionId_questionIdSnapshot_key", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireAnswer_questionId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Questionnaire_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Questionnaire_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "orderNo", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireQuestion_questionnaireId_orderNo_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "customFieldId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireQuestion_customFieldId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_questionnaireId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "questionnaireId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_questionnaireId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"conversationId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "currentQuestionId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"currentQuestionId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_currentQuestionId_idx", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" = 'inProgress'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "QuestionnaireSubmission_workspaceId_contactId_active_key", + "entityType": "indexes", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "RefLinkStat_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "linkId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "occurredAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "RefLinkStat_workspaceId_linkId_occurredAt_contactInboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Reflink_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReply_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SavedReply" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "savedReplyId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_savedReplyId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "mediaLibraryFileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_mediaLibraryFileId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "savedReplyId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "mediaLibraryFileId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SavedReplyImage_savedReplyId_mediaLibraryFileId_key", + "entityType": "indexes", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Sequence_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Sequence_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "idempotencyKey", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_idempotencyKey_key", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_pending_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "bucket", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_pending_bucket_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_status_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_workspaceId_status_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "enrollmentId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_enrollmentId_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_workspace_sequence_step_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "bucket", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "runAtMs", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_bucket_status_runAtMs_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "updatedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" in ('completed', 'failed', 'canceled')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_terminal_updatedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_sequenceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "stepId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceDispatch_stepId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "sequenceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceStep_sequenceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "flowId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "SequenceStep_flowId_idx", + "entityType": "indexes", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "spreadsheetId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_workspaceId_spreadsheetId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "spreadsheetId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Spreadsheet_spreadsheetId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "(\"deletedAt\" is null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tag_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Tag_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tagId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_tag_integration_key", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "externalLabelId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_external_key", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_workspace_channel_idx", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "channelType", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "integrationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TagChannel_integration_idx", + "entityType": "indexes", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "chatId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TelegramChat_inboxId_chatId_key", + "entityType": "indexes", + "schema": "public", + "table": "TelegramChat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TelegramChat_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TelegramChat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "shareToken", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Template_shareToken_key", + "entityType": "indexes", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "templateId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_templateId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstallation_workspaceId_status_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "installationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstalledResource_installationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "resourceKind", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "resourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TemplateInstalledResource_workspaceId_resourceKind_resourceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "active", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Trigger_workspaceId_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_source_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_triggerId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_webhookId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_sourceId_triggerId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Condition_type_sourceId_webhookId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_triggerId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerContactHistory_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_triggerId_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerExecution_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_triggerId_date_key", + "entityType": "indexes", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "triggerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_triggerId_date_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "TriggerStat_workspaceId_date_idx", + "entityType": "indexes", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserDeviceToken_userId_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "UserPersistentMenu_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "openHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_openHoursId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "categoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_categoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "subcategoryId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_subcategoryId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Vendor_workspaceId_name_key", + "entityType": "indexes", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "folderId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_folderId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "active", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Webhook_workspaceId_active_idx", + "entityType": "indexes", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "webhookId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_webhookId_contactId_key", + "entityType": "indexes", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WebhookExecution_contactId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "wabaId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappBusinessAccount_workspaceId_wabaId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "wacid", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"wacid\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_wacid_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "attemptId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"attemptId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_attemptId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "conversationId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_conversationId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_contactInboxId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_workspaceId_createdAt_id_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_contactInboxId_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "createdAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'ringing'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_ringing_createdAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "createdAt", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"status\" = 'ringing' AND \"wacid\" IS NOT NULL AND \"answeredByUserId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_resumableRinging_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "recordedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"recordingPath\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_recording_inboxId_recordedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "inboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"direction\" = 'businessInitiated' AND \"status\" IN ('ringing', 'accepted')", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCall_pendingOutbound_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "contactInboxId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCallPermission_contactInboxId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCallPermission_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_phoneNumberId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "phoneNumberId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "payloadHash", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_phone_hash_uq", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "processedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"processedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_processedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "parseFailedAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "\"parseFailedAt\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappCoexistStaging_parseFailedAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappCoexistStaging" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappFlow_integrationWhatsappId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "integrationWhatsappId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sourceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappMessageTemplate_integrationWhatsappId_sourceId_key", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappSignupSession_userId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "expiresAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WhatsappSignupSession_expiresAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHours_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkingHours" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"workingHoursId\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursDateOverride_workspace_date_key", + "entityType": "indexes", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workingHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"workingHoursId\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursDateOverride_schedule_date_key", + "entityType": "indexes", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "date", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursDateOverride_workspaceId_date_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workingHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursInterval_workingHoursId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workingHoursId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkingHoursMember_workingHoursId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_tenantId_idx", + "entityType": "indexes", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "scheduledDeletionAt", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_scheduledDeletionAt_idx", + "entityType": "indexes", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "supportAccessUntil", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "Workspace_supportAccessUntil_idx", + "entityType": "indexes", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceApiToken_workspaceId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"isDefault\"", + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceApiToken_workspaceId_default_key", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "ownerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "periodStart", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceBotMessageUsage_ownerId_periodStart_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "periodStart", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceBotMessageUsage_tenantId_periodStart_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "ownerEmail", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceDeletionRecord_ownerEmail_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "ownerId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "periodStart", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceMac_ownerId_periodStart_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tenantId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "periodStart", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceMac_tenantId_periodStart_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "workspaceId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "userId", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "WorkspaceMember_workspaceId_userId_idx", + "entityType": "indexes", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "nameExplicit": false, + "columns": [ + "shardId" + ], + "schemaTo": "public", + "tableTo": "MessageShard", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ShardTimeRange_shardId_MessageShard_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ShardTimeRange" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_IENNsXLBb1k1_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_yeTDEtvJMs4H_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionEvent_1X1qUqZpm24x_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AdsConversionEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_k99JXbMObQIn_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": [ + "integrationFacebookAdsId" + ], + "schemaTo": "public", + "tableTo": "IntegrationFacebookAds", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_fBmu8W26Mw5R_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_3zzAptVRRuZD_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AdsConversionRule_HUibBtSUZbML_fkey", + "entityType": "fks", + "schema": "public", + "table": "AdsConversionRule" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIAgent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIAgent" + }, + { + "nameExplicit": false, + "columns": [ + "sourceId" + ], + "schemaTo": "public", + "tableTo": "AIConversationSource", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_sourceId_AIConversationSource_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationEmbedding_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationEmbedding" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationSource_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIConversationSource_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIConversationSource" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIEmbedding_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": false, + "columns": [ + "aiFileId" + ], + "schemaTo": "public", + "tableTo": "AIFile", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIEmbedding_aiFileId_AIFile_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIEmbedding" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIFile_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIFile" + }, + { + "nameExplicit": false, + "columns": [ + "triggerFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIFunction_triggerFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIFunction" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIFunction_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIFunction" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverBulkRun_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverBulkRun_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": false, + "columns": [ + "requestedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIHandoverBulkRun_requestedByUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverBulkRun" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverSettings_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIHandoverSettings_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": false, + "columns": [ + "gotoFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIHandoverSettings_gotoFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": false, + "columns": [ + "applyToAllRequestedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AIHandoverSettings_applyToAllRequestedByUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIHandoverSettings" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AIMCPServer_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AIMCPServer" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsAgentResponseEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsBotMessageEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsBroadcastEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsContactEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsConversationEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsFlowNodeEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsMessageEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "AnalyticsSequenceEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "nameExplicit": false, + "columns": [ + "topicId" + ], + "schemaTo": "public", + "tableTo": "EmailTopic", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_topicId_EmailTopic_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AnalyticsEmailTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AnalyticsEmailTopic_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AnalyticsEmailTopic" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Appointment_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": [ + "calendarId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Appointment_calendarId_AppointmentCalendar_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Appointment_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Appointment_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Appointment_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Appointment" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "confirmationFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_confirmationFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "cancellationFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_cancellationFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "externalConnectionId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentCalendar_externalConnectionId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "calendarId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarAvailability_QfahoIQAX592_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendarAvailability" + }, + { + "nameExplicit": false, + "columns": [ + "calendarId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendar", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarReminder_5O4INfYC3dY3_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentCalendarReminder_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentCalendarReminder" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "appointmentId" + ], + "schemaTo": "public", + "tableTo": "Appointment", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_appointmentId_Appointment_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "reminderConfigId" + ], + "schemaTo": "public", + "tableTo": "AppointmentCalendarReminder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AppointmentReminderDispatch_a526jJM55OD7_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AppointmentReminderDispatch_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AppointmentReminderDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Account_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Account" + }, + { + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Account_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Account" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Invitation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Invitation" + }, + { + "nameExplicit": false, + "columns": [ + "invitedBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Invitation_invitedBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Invitation" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Session_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Session" + }, + { + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "User_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "User" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomatedResponse_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AutomatedResponse_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AutomatedResponse_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomatedResponse" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomationThrottle_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AutomationThrottle_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BotField_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BotField" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BotField_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BotField" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Broadcast_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Broadcast_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_integrationWhatsappId_IntegrationWhatsapp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_integrationMessengerId_IntegrationMessenger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": [ + "parentBroadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Broadcast_parentBroadcastId_Broadcast_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Broadcast" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrence_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "nameExplicit": false, + "columns": [ + "broadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrence_broadcastId_Broadcast_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastRecurrence" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrenceOccurrence_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": false, + "columns": [ + "recurrenceId" + ], + "schemaTo": "public", + "tableTo": "BroadcastRecurrence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastRecurrenceOccurrence_x0yNXfzZ2cZs_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": false, + "columns": [ + "childBroadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BroadcastRecurrenceOccurrence_Md67cxyTrOQZ_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence" + }, + { + "nameExplicit": false, + "columns": [ + "broadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastTarget_broadcastId_Broadcast_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "BroadcastTarget_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "BroadcastTarget_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Cart_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Cart_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Cart_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Cart" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ChannelPost_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ChannelPost" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ChannelPost_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ChannelPost" + }, + { + "nameExplicit": false, + "columns": [ + "requestedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CoexistSyncRun_requestedByUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CoexistSyncRun" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomation_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomation_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "CommentAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationEvent_automationId_CommentAutomation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationEvent_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationMiss_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "CommentAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CommentAutomationMiss_automationId_CommentAutomation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationMiss_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CommentAutomationMiss_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationMiss" + }, + { + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "CommentAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "CommentAutomationReply_automationId_CommentAutomation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "CommentAutomationReply_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "CommentAutomationReply_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CommentAutomationReply" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConnectSession_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": false, + "columns": [ + "targetConnectionId" + ], + "schemaTo": "public", + "tableTo": "Connection", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConnectSession_targetConnectionId_Connection_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": false, + "columns": [ + "actorUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ConnectSession_actorUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": false, + "columns": [ + "actorTokenId" + ], + "schemaTo": "public", + "tableTo": "WorkspaceApiToken", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ConnectSession_actorTokenId_WorkspaceApiToken_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConnectSession" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Connection_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Connection_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Connection_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": false, + "columns": [ + "createdBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Connection_createdBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Connection" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Contact_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Contact" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactCustomField_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactCustomField_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactCustomField" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactInbox_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactInbox_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactInbox" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactNote_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactNote" + }, + { + "nameExplicit": false, + "columns": [ + "createdById" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactNote_createdById_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactNote" + }, + { + "nameExplicit": false, + "columns": [ + "broadcastId" + ], + "schemaTo": "public", + "tableTo": "Broadcast", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_broadcastId_Broadcast_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnBroadcast_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": false, + "columns": [ + "sequenceId" + ], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_sequenceId_Sequence_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSequence_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSmartDelay_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": false, + "columns": [ + "appointmentId" + ], + "schemaTo": "public", + "tableTo": "Appointment", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ContactOnSmartDelay_appointmentId_Appointment_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactOnSmartDelay_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactOnSmartDelay" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTag_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTag" + }, + { + "nameExplicit": false, + "columns": [ + "tagId" + ], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTag_tagId_Tag_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTag" + }, + { + "nameExplicit": false, + "columns": [ + "tagId" + ], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_tagId_Tag_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": false, + "columns": [ + "tagChannelId" + ], + "schemaTo": "public", + "tableTo": "TagChannel", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_tagChannelId_TagChannel_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ContactToTagChannel_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "nameExplicit": false, + "columns": [ + "assignedUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Conversation_assignedUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": [ + "assignedInboxTeamId" + ], + "schemaTo": "public", + "tableTo": "InboxTeam", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Conversation_assignedInboxTeamId_InboxTeam_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Conversation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Conversation_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Conversation" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ConversationParticipant_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ConversationParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Coupon_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": false, + "columns": [ + "topicId" + ], + "schemaTo": "public", + "tableTo": "CouponTopic", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Coupon_topicId_CouponTopic_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": false, + "columns": [ + "issuedContactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Coupon_issuedContactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Coupon" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CouponTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": false, + "columns": [ + "createdById" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CouponTopic_createdById_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CouponTopic" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "CustomField_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CustomField" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CustomField_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CustomField" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DecisionConnection_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DecisionConnection" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DecisionProfile_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DecisionProfile" + }, + { + "nameExplicit": false, + "columns": [ + "connectionId" + ], + "schemaTo": "public", + "tableTo": "DecisionConnection", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "DecisionProfile_connectionId_DecisionConnection_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DecisionProfile" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCode_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DiscountCode" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "DiscountCode_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DiscountCode" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DynamicImage_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DynamicImage" + }, + { + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "DynamicImage_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DynamicImage" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EcommerceOpenHours_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceOpenHours" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EcommerceOrderCounter_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceOrderCounter" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EcommerceSettings_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": false, + "columns": [ + "openHoursId" + ], + "schemaTo": "public", + "tableTo": "EcommerceOpenHours", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_openHoursId_EcommerceOpenHours_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": false, + "columns": [ + "abandonedCartFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_abandonedCartFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": false, + "columns": [ + "checkoutFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_checkoutFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": false, + "columns": [ + "orderConfirmationFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EcommerceSettings_orderConfirmationFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "EmailTopic_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "EmailTopic_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "EmailTopic" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "AuditLog_workspaceId_fkey", + "entityType": "fks", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": true, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "AuditLog_userId_fkey", + "entityType": "fks", + "schema": "public", + "table": "AuditLog" + }, + { + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "CustomDomain_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "CustomDomain" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "PlatformAdmin_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "PlatformAdmin" + }, + { + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Tenant_ownerId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Tenant" + }, + { + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TenantHelpItem_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TenantHelpItem" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "UserQuota_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "UserQuota" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "WorkspaceUsage_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceUsage" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ErrorLog_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "ErrorLog_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ErrorLog" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ExternalWebhook_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ExternalWebhook" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookLeadAdsAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "automationId" + ], + "schemaTo": "public", + "tableTo": "FacebookLeadAdsAutomation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookLeadAdsLead_n8swD949nr3L_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "FacebookLeadAdsLead_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookLeadAdsLead" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookMarketingMessage_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookMarketingMessage" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FacebookMarketingMessagesAuth_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FacebookMarketingMessagesAuth" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "File_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "File_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "File" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Flow_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Flow" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Flow_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Flow" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowNodeStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowNodeStat" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": [ + "flowVersionId" + ], + "schemaTo": "public", + "tableTo": "FlowVersion", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_flowVersionId_FlowVersion_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowRun_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowRun" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowVersion_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowVersion" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "FlowVersion_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "FlowVersion" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Folder_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Folder" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "GoogleAdsConversionEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "integrationGoogleAdsId" + ], + "schemaTo": "public", + "tableTo": "IntegrationGoogleAds", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "GoogleAdsConversionEvent_Ju5oh0fVmaLy_fkey", + "entityType": "fks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "GoogleAdsConversionEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "GoogleAdsSettings_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "GoogleAdsSettings" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IgStoryAutomation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IgStoryAutomation_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IgStoryAutomation_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IgStoryAutomation" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Import_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Import_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Import_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": [ + "fileId" + ], + "schemaTo": "public", + "tableTo": "File", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Import_fileId_File_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Import" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboundWebhook_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboundWebhook" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboundWebhookRequest_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": false, + "columns": [ + "inboundWebhookId" + ], + "schemaTo": "public", + "tableTo": "InboundWebhook", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboundWebhookRequest_inboundWebhookId_InboundWebhook_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "InboundWebhookRequest_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "InboundWebhookRequest_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboundWebhookRequest" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Inbox_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Inbox" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxContactStat_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxContactStat" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeam_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxTeam" + }, + { + "nameExplicit": false, + "columns": [ + "inboxTeamId" + ], + "schemaTo": "public", + "tableTo": "InboxTeam", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeamMember_inboxTeamId_InboxTeam_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "InboxTeamMember_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "InboxTeamMember" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationActiveCampaign_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationActiveCampaign_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationActiveCampaign" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationApi_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationApi" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationApi_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationApi" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Integration_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Integration" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationClaude_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationClaude_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationClaude" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDeepseek_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDeepseek_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDeepseek" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDrip_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationDrip_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationDrip" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationFacebookAds_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationFacebookAds_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationFacebookAds" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGemini_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGemini_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGemini" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGetResponse_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGetResponse_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGetResponse" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleAds_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleAds_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleAds" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleCalendar_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleSheet_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationGoogleSheet_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationGoogleSheet" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationInstagram_workspaceId_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationInstagram_inboxId_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": true, + "columns": [ + "welcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationInstagram_welcomeFlowId_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationInstagram" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationKlaviyo_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationKlaviyo_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationKlaviyo" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailchimp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailchimp_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailchimp" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailerLite_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMailerLite_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMailerLite" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMessenger_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMessenger_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": [ + "welcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationMessenger_welcomeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": [ + "handoverResumeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationMessenger_handoverResumeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMessenger" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMetaCatalog_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMetaCatalog_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMetaCatalog" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMoosend_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationMoosend_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationMoosend" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenai_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenai_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": [ + "aiAgentId" + ], + "schemaTo": "public", + "tableTo": "AIAgent", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationOpenai_aiAgentId_AIAgent_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenai" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenaiCompatible_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenaiCompatible_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenaiCompatible" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenrouter_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOpenrouter_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOpenrouter" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOutlookCalendar_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationOutlookCalendar_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationOutlookCalendar" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSendGrid_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": false, + "columns": [ + "integrationId" + ], + "schemaTo": "public", + "tableTo": "Integration", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSendGrid_integrationId_Integration_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSendGrid" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSmtp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationSmtp_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationSmtp" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTelegram_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTelegram_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTelegram" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationThreads_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationThreads_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationThreads" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTiktok_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationTiktok_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationTiktok" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWebchat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWebchat_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": false, + "columns": [ + "welcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationWebchat_welcomeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWebchat" + }, + { + "nameExplicit": false, + "columns": [ + "handoverResumeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationWhatsapp_handoverResumeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWhatsapp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationWhatsapp_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationZalo_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "IntegrationZalo_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": false, + "columns": [ + "fallbackFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "IntegrationZalo_fallbackFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "IntegrationZalo" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Leaderboard_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Leaderboard_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": false, + "columns": [ + "minigameId" + ], + "schemaTo": "public", + "tableTo": "Minigame", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Leaderboard_minigameId_Minigame_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": false, + "columns": [ + "referralWelcomeFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Leaderboard_referralWelcomeFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Leaderboard" + }, + { + "nameExplicit": false, + "columns": [ + "leaderboardId" + ], + "schemaTo": "public", + "tableTo": "Leaderboard", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardAuditLog_leaderboardId_Leaderboard_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardAuditLog_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "LeaderboardAuditLog_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "nameExplicit": false, + "columns": [ + "actorUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "LeaderboardAuditLog_actorUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardAuditLog" + }, + { + "nameExplicit": false, + "columns": [ + "leaderboardId" + ], + "schemaTo": "public", + "tableTo": "Leaderboard", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardParticipant_leaderboardId_Leaderboard_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardParticipant_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "LeaderboardParticipant_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "referrerContactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "LeaderboardParticipant_referrerContactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLink_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MagicLink" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLinkStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "nameExplicit": false, + "columns": [ + "linkId" + ], + "schemaTo": "public", + "tableTo": "MagicLink", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MagicLinkStat_linkId_MagicLink_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MagicLinkStat" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MediaLibraryFile_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "MediaLibraryFolder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MediaLibraryFile_folderId_MediaLibraryFolder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MediaLibraryFile" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MediaLibraryFolder_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MediaLibraryFolder" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_D2X0VlACjh0B_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_DlCmuyYqclNt_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdOperation_LwL2ykeZegup_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": false, + "columns": [ + "createdBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MessagingAdOperation_createdBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_Q2FrBLiP3QqD_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_tLZC78O5pMBb_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": false, + "columns": [ + "integrationInstagramId" + ], + "schemaTo": "public", + "tableTo": "IntegrationInstagram", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessagingAdsConnection_4ubezEjd9jQX_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerMessageTemplate_x0Vv1d8cvLYN_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessengerMessageTemplate" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerWelcomeMessageFlow_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMessengerId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMessenger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MessengerWelcomeMessageFlow_OSpsF41G77zr_fkey", + "entityType": "fks", + "schema": "public", + "table": "MessengerWelcomeMessageFlow" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCapiEvent_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCapiEvent_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMetaCatalogId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMetaCatalog", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogItem_wJXyKUssR08y_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogItem_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogItem" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogSyncRun_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": false, + "columns": [ + "integrationMetaCatalogId" + ], + "schemaTo": "public", + "tableTo": "IntegrationMetaCatalog", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MetaCatalogSyncRun_8PnmCJ0uISUd_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MetaCatalogSyncRun_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MetaCatalogSyncRun" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniApp_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniApp" + }, + { + "nameExplicit": false, + "columns": [ + "miniAppId" + ], + "schemaTo": "public", + "tableTo": "MiniApp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppPublication_miniAppId_MiniApp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppPublication_oBb1VPqI8uvn_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "nameExplicit": false, + "columns": [ + "whatsappFlowId" + ], + "schemaTo": "public", + "tableTo": "WhatsappFlow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MiniAppPublication_whatsappFlowId_WhatsappFlow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppPublication" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppSubmission_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "miniAppId" + ], + "schemaTo": "public", + "tableTo": "MiniApp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppSubmission_miniAppId_MiniApp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MiniAppSubmission_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppUpload_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": false, + "columns": [ + "miniAppId" + ], + "schemaTo": "public", + "tableTo": "MiniApp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppUpload_miniAppId_MiniApp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MiniAppUpload_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": false, + "columns": [ + "submissionId" + ], + "schemaTo": "public", + "tableTo": "MiniAppSubmission", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MiniAppUpload_submissionId_MiniAppSubmission_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MiniAppUpload" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Minigame_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Minigame" + }, + { + "nameExplicit": false, + "columns": [ + "minigameId" + ], + "schemaTo": "public", + "tableTo": "Minigame", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigameContact_minigameId_Minigame_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigameContact_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": false, + "columns": [ + "referrerContactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MinigameContact_referrerContactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "MinigameContact_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MinigameContact" + }, + { + "nameExplicit": false, + "columns": [ + "minigameId" + ], + "schemaTo": "public", + "tableTo": "Minigame", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigamePlay_minigameId_Minigame_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MinigamePlay" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "MinigamePlay_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "MinigamePlay" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCodeRedemption_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": false, + "columns": [ + "discountCodeId" + ], + "schemaTo": "public", + "tableTo": "DiscountCode", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCodeRedemption_discountCodeId_DiscountCode_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": false, + "columns": [ + "orderId" + ], + "schemaTo": "public", + "tableTo": "Order", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "DiscountCodeRedemption_orderId_Order_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "DiscountCodeRedemption_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "DiscountCodeRedemption" + }, + { + "nameExplicit": false, + "columns": [ + "orderId" + ], + "schemaTo": "public", + "tableTo": "Order", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderItem_orderId_Order_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderItem_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": false, + "columns": [ + "variantId" + ], + "schemaTo": "public", + "tableTo": "ProductVariant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_variantId_ProductVariant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": false, + "columns": [ + "vendorId" + ], + "schemaTo": "public", + "tableTo": "Vendor", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_vendorId_Vendor_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderItem_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderItem" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Order_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": false, + "columns": [ + "discountCodeId" + ], + "schemaTo": "public", + "tableTo": "DiscountCode", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Order_discountCodeId_DiscountCode_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Order" + }, + { + "nameExplicit": false, + "columns": [ + "orderId" + ], + "schemaTo": "public", + "tableTo": "Order", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderStatusHistory_orderId_Order_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "OrderStatusHistory_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "nameExplicit": false, + "columns": [ + "actorUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "OrderStatusHistory_actorUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "OrderStatusHistory" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Credential_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "PlatformCredential" + }, + { + "nameExplicit": false, + "columns": [ + "vendorId" + ], + "schemaTo": "public", + "tableTo": "Vendor", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_vendorId_Vendor_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": [ + "subcategoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Product_subcategoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Product_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Product" + }, + { + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductAddon_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductAddon" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductCategory_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": false, + "columns": [ + "parentId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductCategory_parentId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductVariant_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductVariant" + }, + { + "nameExplicit": false, + "columns": [ + "productId" + ], + "schemaTo": "public", + "tableTo": "Product", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ProductVariantOption_productId_Product_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ProductVariantOption" + }, + { + "nameExplicit": false, + "columns": [ + "submissionId" + ], + "schemaTo": "public", + "tableTo": "QuestionnaireSubmission", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireAnswer_l8clOEM7NsPl_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": false, + "columns": [ + "questionId" + ], + "schemaTo": "public", + "tableTo": "QuestionnaireQuestion", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireAnswer_questionId_QuestionnaireQuestion_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireAnswer" + }, + { + "nameExplicit": false, + "columns": [ + "triggerFlowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Questionnaire_triggerFlowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Questionnaire_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Questionnaire" + }, + { + "nameExplicit": false, + "columns": [ + "questionnaireId" + ], + "schemaTo": "public", + "tableTo": "Questionnaire", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireQuestion_questionnaireId_Questionnaire_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireQuestion_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "questionnaireId" + ], + "schemaTo": "public", + "tableTo": "Questionnaire", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_questionnaireId_Questionnaire_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "QuestionnaireSubmission_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireSubmission_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "currentQuestionId" + ], + "schemaTo": "public", + "tableTo": "QuestionnaireQuestion", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "QuestionnaireSubmission_mha0bYFxcV7A_fkey", + "entityType": "fks", + "schema": "public", + "table": "QuestionnaireSubmission" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "RefLinkStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": false, + "columns": [ + "linkId" + ], + "schemaTo": "public", + "tableTo": "Reflink", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "RefLinkStat_linkId_Reflink_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "RefLinkStat" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Reflink_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Reflink_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": [ + "customFieldId" + ], + "schemaTo": "public", + "tableTo": "CustomField", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Reflink_customFieldId_CustomField_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": [ + "widgetLogoFileId" + ], + "schemaTo": "public", + "tableTo": "MediaLibraryFile", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Reflink_widgetLogoFileId_MediaLibraryFile_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Reflink" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "ResponseSlaPolicy_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReply_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SavedReply" + }, + { + "nameExplicit": false, + "columns": [ + "savedReplyId" + ], + "schemaTo": "public", + "tableTo": "SavedReply", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReplyImage_savedReplyId_SavedReply_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": false, + "columns": [ + "mediaLibraryFileId" + ], + "schemaTo": "public", + "tableTo": "MediaLibraryFile", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReplyImage_mediaLibraryFileId_MediaLibraryFile_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SavedReplyImage_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SavedReplyImage" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Sequence_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Sequence_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Sequence" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "sequenceId" + ], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_sequenceId_Sequence_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "stepId" + ], + "schemaTo": "public", + "tableTo": "SequenceStep", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_stepId_SequenceStep_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": true, + "columns": [ + "enrollmentId", + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "ContactOnSequence", + "columnsTo": [ + "id", + "workspaceId" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceDispatch_enrollment_workspace_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "nameExplicit": false, + "columns": [ + "flowId" + ], + "schemaTo": "public", + "tableTo": "Flow", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "SequenceStep_flowId_Flow_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": false, + "columns": [ + "sequenceId" + ], + "schemaTo": "public", + "tableTo": "Sequence", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "SequenceStep_sequenceId_Sequence_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "SequenceStep" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Spreadsheet_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Spreadsheet" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Tag_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Tag_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Tag" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TagChannel_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": false, + "columns": [ + "tagId" + ], + "schemaTo": "public", + "tableTo": "Tag", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TagChannel_tagId_Tag_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TagChannel" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TelegramChat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TelegramChat" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TelegramChat_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TelegramChat" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Template_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Template_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": false, + "columns": [ + "createdBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Template_createdBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Template" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstallation_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": [ + "templateId" + ], + "schemaTo": "public", + "tableTo": "Template", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_templateId_Template_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": [ + "installFolderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_installFolderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": [ + "installedBy" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "TemplateInstallation_installedBy_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstallation" + }, + { + "nameExplicit": false, + "columns": [ + "installationId" + ], + "schemaTo": "public", + "tableTo": "TemplateInstallation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstalledResource_a0BqwWeO96EB_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TemplateInstalledResource_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TemplateInstalledResource" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Trigger_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Trigger_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Trigger" + }, + { + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Condition_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": false, + "columns": [ + "webhookId" + ], + "schemaTo": "public", + "tableTo": "Webhook", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Condition_webhookId_Webhook_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Condition" + }, + { + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerContactHistory_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerExecution_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerExecution" + }, + { + "nameExplicit": false, + "columns": [ + "triggerId" + ], + "schemaTo": "public", + "tableTo": "Trigger", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerStat_triggerId_Trigger_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "TriggerStat_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "TriggerStat" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserDeviceToken_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserDeviceToken_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "UserPersistentMenu_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "UserPersistentMenu" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Vendor_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": false, + "columns": [ + "openHoursId" + ], + "schemaTo": "public", + "tableTo": "EcommerceOpenHours", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Vendor_openHoursId_EcommerceOpenHours_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": false, + "columns": [ + "categoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Vendor_categoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": false, + "columns": [ + "subcategoryId" + ], + "schemaTo": "public", + "tableTo": "ProductCategory", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Vendor_subcategoryId_ProductCategory_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Vendor" + }, + { + "nameExplicit": false, + "columns": [ + "folderId" + ], + "schemaTo": "public", + "tableTo": "Folder", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "Webhook_folderId_Folder_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "Webhook_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Webhook" + }, + { + "nameExplicit": false, + "columns": [ + "webhookId" + ], + "schemaTo": "public", + "tableTo": "Webhook", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_webhookId_Webhook_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": false, + "columns": [ + "contactId" + ], + "schemaTo": "public", + "tableTo": "Contact", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_contactId_Contact_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WebhookExecution_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WebhookExecution" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappBusinessAccount_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappBusinessAccount" + }, + { + "nameExplicit": false, + "columns": [ + "answeredByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "WhatsappCall_answeredByUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": false, + "columns": [ + "initiatedByUserId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "SET NULL", + "name": "WhatsappCall_initiatedByUserId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": false, + "columns": [ + "inboxId" + ], + "schemaTo": "public", + "tableTo": "Inbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_inboxId_Inbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": false, + "columns": [ + "conversationId" + ], + "schemaTo": "public", + "tableTo": "Conversation", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCall_conversationId_Conversation_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCall" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCallPermission_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "nameExplicit": false, + "columns": [ + "contactInboxId" + ], + "schemaTo": "public", + "tableTo": "ContactInbox", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappCallPermission_contactInboxId_ContactInbox_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappCallPermission" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappFlow_integrationWhatsappId_IntegrationWhatsapp_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappFlow" + }, + { + "nameExplicit": false, + "columns": [ + "integrationWhatsappId" + ], + "schemaTo": "public", + "tableTo": "IntegrationWhatsapp", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappMessageTemplate_p6pSomUTTJCm_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappMessageTemplate" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_ownerId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WhatsappSignupSession_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHours_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHours" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursDateOverride_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "nameExplicit": true, + "columns": [ + "workingHoursId", + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "WorkingHours", + "columnsTo": [ + "id", + "workspaceId" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursDateOverride_workingHoursId_workspaceId_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHoursDateOverride" + }, + { + "nameExplicit": false, + "columns": [ + "workingHoursId" + ], + "schemaTo": "public", + "tableTo": "WorkingHours", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursInterval_workingHoursId_WorkingHours_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursMember_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursMember_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "nameExplicit": true, + "columns": [ + "workingHoursId", + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "WorkingHours", + "columnsTo": [ + "id", + "workspaceId" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkingHoursMember_workingHoursId_workspaceId_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Workspace_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": false, + "columns": [ + "tenantId" + ], + "schemaTo": "public", + "tableTo": "Tenant", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "RESTRICT", + "name": "Workspace_tenantId_Tenant_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "Workspace" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceApiToken_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceBotMessageUsage_ownerId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "nameExplicit": false, + "columns": [ + "ownerId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMac_ownerId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "schemaTo": "public", + "tableTo": "Workspace", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMember_workspaceId_Workspace_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "schemaTo": "public", + "tableTo": "User", + "columnsTo": [ + "id" + ], + "onUpdate": "CASCADE", + "onDelete": "CASCADE", + "name": "WorkspaceMember_userId_User_id_fkey", + "entityType": "fks", + "schema": "public", + "table": "WorkspaceMember" + }, + { + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsAgentResponseEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsAgentResponseEvent" + }, + { + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsBotMessageEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsBotMessageEvent" + }, + { + "columns": [ + "broadcastId", + "contactInboxId", + "batchId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsBroadcastEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsBroadcastEvent" + }, + { + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsContactEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsContactEvent" + }, + { + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsConversationEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsConversationEvent" + }, + { + "columns": [ + "flowId", + "analyticsId", + "nodeId", + "buttonId", + "contactInboxId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsFlowNodeEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsFlowNodeEvent" + }, + { + "columns": [ + "occurredAt", + "eventId" + ], + "nameExplicit": false, + "name": "AnalyticsMessageEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsMessageEvent" + }, + { + "columns": [ + "sequenceId", + "stepId", + "contactInboxId", + "eventType", + "occurredAt" + ], + "nameExplicit": false, + "name": "AnalyticsSequenceEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "AnalyticsSequenceEvent" + }, + { + "columns": [ + "id", + "createdAt" + ], + "nameExplicit": false, + "name": "Attachment_pkey", + "entityType": "pks", + "schema": "public", + "table": "Attachment" + }, + { + "columns": [ + "workspaceId", + "contactInboxId", + "throttleType", + "subjectId" + ], + "nameExplicit": true, + "name": "AutomationThrottle_pkey", + "entityType": "pks", + "schema": "public", + "table": "AutomationThrottle" + }, + { + "columns": [ + "broadcastId", + "inboxId" + ], + "nameExplicit": true, + "name": "BroadcastTarget_pkey", + "entityType": "pks", + "schema": "public", + "table": "BroadcastTarget" + }, + { + "columns": [ + "workspaceId", + "hourBucket", + "contactInboxId" + ], + "nameExplicit": false, + "name": "ContactActiveHourly_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactActiveHourly" + }, + { + "columns": [ + "workspaceId", + "periodStart", + "contactInboxId" + ], + "nameExplicit": false, + "name": "ContactActiveMonthly_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactActiveMonthly" + }, + { + "columns": [ + "workspaceId", + "contactId", + "activityType", + "referenceType", + "parentReferenceId", + "referenceId" + ], + "nameExplicit": true, + "name": "ContactActivity_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactActivity" + }, + { + "columns": [ + "workspaceId", + "contactInboxId", + "postId" + ], + "nameExplicit": true, + "name": "ContactInboxPost_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactInboxPost" + }, + { + "columns": [ + "workspaceId", + "contactId", + "messageId" + ], + "nameExplicit": true, + "name": "ContactKeywordMessage_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactKeywordMessage" + }, + { + "columns": [ + "broadcastId", + "contactId" + ], + "nameExplicit": true, + "name": "ContactsOnBroadcast_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactOnBroadcast" + }, + { + "columns": [ + "id", + "workspaceId" + ], + "nameExplicit": true, + "name": "ContactOnSequence_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactOnSequence" + }, + { + "columns": [ + "workspaceId", + "contactId" + ], + "nameExplicit": true, + "name": "ContactState_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactState" + }, + { + "columns": [ + "contactId", + "tagId" + ], + "nameExplicit": false, + "name": "ContactToTag_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactToTag" + }, + { + "columns": [ + "tagChannelId", + "contactInboxId" + ], + "nameExplicit": false, + "name": "ContactToTagChannel_pkey", + "entityType": "pks", + "schema": "public", + "table": "ContactToTagChannel" + }, + { + "columns": [ + "leaderboardId", + "contactId" + ], + "nameExplicit": false, + "name": "LeaderboardParticipant_pkey", + "entityType": "pks", + "schema": "public", + "table": "LeaderboardParticipant" + }, + { + "columns": [ + "createdAt", + "id" + ], + "nameExplicit": false, + "name": "LeaderboardScoreEvent_pkey", + "entityType": "pks", + "schema": "public", + "table": "LeaderboardScoreEvent" + }, + { + "columns": [ + "id", + "createdAt" + ], + "nameExplicit": false, + "name": "Message_pkey", + "entityType": "pks", + "schema": "public", + "table": "Message" + }, + { + "columns": [ + "id", + "workspaceId" + ], + "nameExplicit": true, + "name": "SequenceDispatch_pkey", + "entityType": "pks", + "schema": "public", + "table": "SequenceDispatch" + }, + { + "columns": [ + "id", + "contactId" + ], + "nameExplicit": true, + "name": "TriggerContactHistory_pkey", + "entityType": "pks", + "schema": "public", + "table": "TriggerContactHistory" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessageShard_pkey", + "schema": "public", + "table": "MessageShard", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ShardTimeRange_pkey", + "schema": "public", + "table": "ShardTimeRange", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AdsConversionEvent_pkey", + "schema": "public", + "table": "AdsConversionEvent", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AdsConversionRule_pkey", + "schema": "public", + "table": "AdsConversionRule", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIAgent_pkey", + "schema": "public", + "table": "AIAgent", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIConversationEmbedding_pkey", + "schema": "public", + "table": "AIConversationEmbedding", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIConversationSource_pkey", + "schema": "public", + "table": "AIConversationSource", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIEmbedding_pkey", + "schema": "public", + "table": "AIEmbedding", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIFile_pkey", + "schema": "public", + "table": "AIFile", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIFunction_pkey", + "schema": "public", + "table": "AIFunction", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIHandoverBulkRun_pkey", + "schema": "public", + "table": "AIHandoverBulkRun", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIHandoverSettings_pkey", + "schema": "public", + "table": "AIHandoverSettings", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AIMCPServer_pkey", + "schema": "public", + "table": "AIMCPServer", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AnalyticsEmailTopic_pkey", + "schema": "public", + "table": "AnalyticsEmailTopic", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Appointment_pkey", + "schema": "public", + "table": "Appointment", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentCalendar_pkey", + "schema": "public", + "table": "AppointmentCalendar", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentCalendarAvailability_pkey", + "schema": "public", + "table": "AppointmentCalendarAvailability", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentCalendarReminder_pkey", + "schema": "public", + "table": "AppointmentCalendarReminder", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AppointmentReminderDispatch_pkey", + "schema": "public", + "table": "AppointmentReminderDispatch", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Account_pkey", + "schema": "public", + "table": "Account", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Invitation_pkey", + "schema": "public", + "table": "Invitation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Jwk_pkey", + "schema": "public", + "table": "Jwk", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Session_pkey", + "schema": "public", + "table": "Session", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "User_pkey", + "schema": "public", + "table": "User", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Verification_pkey", + "schema": "public", + "table": "Verification", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AutomatedResponse_pkey", + "schema": "public", + "table": "AutomatedResponse", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "BotField_pkey", + "schema": "public", + "table": "BotField", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Broadcast_pkey", + "schema": "public", + "table": "Broadcast", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "BroadcastRecurrence_pkey", + "schema": "public", + "table": "BroadcastRecurrence", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "BroadcastRecurrenceOccurrence_pkey", + "schema": "public", + "table": "BroadcastRecurrenceOccurrence", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Cart_pkey", + "schema": "public", + "table": "Cart", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ChannelPost_pkey", + "schema": "public", + "table": "ChannelPost", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CoexistSyncRun_pkey", + "schema": "public", + "table": "CoexistSyncRun", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomation_pkey", + "schema": "public", + "table": "CommentAutomation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomationEvent_pkey", + "schema": "public", + "table": "CommentAutomationEvent", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomationMiss_pkey", + "schema": "public", + "table": "CommentAutomationMiss", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CommentAutomationReply_pkey", + "schema": "public", + "table": "CommentAutomationReply", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ConnectSession_pkey", + "schema": "public", + "table": "ConnectSession", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Connection_pkey", + "schema": "public", + "table": "Connection", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Contact_pkey", + "schema": "public", + "table": "Contact", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactCustomField_pkey", + "schema": "public", + "table": "ContactCustomField", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactInbox_pkey", + "schema": "public", + "table": "ContactInbox", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactNote_pkey", + "schema": "public", + "table": "ContactNote", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ContactOnSmartDelay_pkey", + "schema": "public", + "table": "ContactOnSmartDelay", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Conversation_pkey", + "schema": "public", + "table": "Conversation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ConversationParticipant_pkey", + "schema": "public", + "table": "ConversationParticipant", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Coupon_pkey", + "schema": "public", + "table": "Coupon", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CouponTopic_pkey", + "schema": "public", + "table": "CouponTopic", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CustomField_pkey", + "schema": "public", + "table": "CustomField", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DecisionConnection_pkey", + "schema": "public", + "table": "DecisionConnection", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DecisionProfile_pkey", + "schema": "public", + "table": "DecisionProfile", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DiscountCode_pkey", + "schema": "public", + "table": "DiscountCode", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DynamicImage_pkey", + "schema": "public", + "table": "DynamicImage", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "EcommerceOpenHours_pkey", + "schema": "public", + "table": "EcommerceOpenHours", + "entityType": "pks" + }, + { + "columns": [ + "workspaceId" + ], + "nameExplicit": false, + "name": "EcommerceOrderCounter_pkey", + "schema": "public", + "table": "EcommerceOrderCounter", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "EcommerceSettings_pkey", + "schema": "public", + "table": "EcommerceSettings", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "EmailTopic_pkey", + "schema": "public", + "table": "EmailTopic", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "AuditLog_pkey", + "schema": "public", + "table": "AuditLog", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "CustomDomain_pkey", + "schema": "public", + "table": "CustomDomain", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "License_pkey", + "schema": "public", + "table": "License", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "PlatformAdmin_pkey", + "schema": "public", + "table": "PlatformAdmin", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Tenant_pkey", + "schema": "public", + "table": "Tenant", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TenantHelpItem_pkey", + "schema": "public", + "table": "TenantHelpItem", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "UserQuota_pkey", + "schema": "public", + "table": "UserQuota", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceUsage_pkey", + "schema": "public", + "table": "WorkspaceUsage", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ErrorLog_pkey", + "schema": "public", + "table": "ErrorLog", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ExternalWebhook_pkey", + "schema": "public", + "table": "ExternalWebhook", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookLeadAdsAutomation_pkey", + "schema": "public", + "table": "FacebookLeadAdsAutomation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookLeadAdsLead_pkey", + "schema": "public", + "table": "FacebookLeadAdsLead", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookMarketingMessage_pkey", + "schema": "public", + "table": "FacebookMarketingMessage", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FacebookMarketingMessagesAuth_pkey", + "schema": "public", + "table": "FacebookMarketingMessagesAuth", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "File_pkey", + "schema": "public", + "table": "File", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Flow_pkey", + "schema": "public", + "table": "Flow", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowAnalyticsSession_pkey", + "schema": "public", + "table": "FlowAnalyticsSession", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowNodeStat_pkey", + "schema": "public", + "table": "FlowNodeStat", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowRun_pkey", + "schema": "public", + "table": "FlowRun", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "FlowVersion_pkey", + "schema": "public", + "table": "FlowVersion", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Folder_pkey", + "schema": "public", + "table": "Folder", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "GoogleAdsConversionEvent_pkey", + "schema": "public", + "table": "GoogleAdsConversionEvent", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "GoogleAdsSettings_pkey", + "schema": "public", + "table": "GoogleAdsSettings", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IgStoryAutomation_pkey", + "schema": "public", + "table": "IgStoryAutomation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Import_pkey", + "schema": "public", + "table": "Import", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboundWebhook_pkey", + "schema": "public", + "table": "InboundWebhook", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboundWebhookRequest_pkey", + "schema": "public", + "table": "InboundWebhookRequest", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Inbox_pkey", + "schema": "public", + "table": "Inbox", + "entityType": "pks" + }, + { + "columns": [ + "inboxId" + ], + "nameExplicit": false, + "name": "InboxContactStat_pkey", + "schema": "public", + "table": "InboxContactStat", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboxTeam_pkey", + "schema": "public", + "table": "InboxTeam", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "InboxTeamMember_pkey", + "schema": "public", + "table": "InboxTeamMember", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationActiveCampaign_pkey", + "schema": "public", + "table": "IntegrationActiveCampaign", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationApi_pkey", + "schema": "public", + "table": "IntegrationApi", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Integration_pkey", + "schema": "public", + "table": "Integration", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationClaude_pkey", + "schema": "public", + "table": "IntegrationClaude", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationDeepseek_pkey", + "schema": "public", + "table": "IntegrationDeepseek", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationDrip_pkey", + "schema": "public", + "table": "IntegrationDrip", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationFacebookAds_pkey", + "schema": "public", + "table": "IntegrationFacebookAds", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGemini_pkey", + "schema": "public", + "table": "IntegrationGemini", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGetResponse_pkey", + "schema": "public", + "table": "IntegrationGetResponse", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGoogleAds_pkey", + "schema": "public", + "table": "IntegrationGoogleAds", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGoogleCalendar_pkey", + "schema": "public", + "table": "IntegrationGoogleCalendar", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationGoogleSheet_pkey", + "schema": "public", + "table": "IntegrationGoogleSheet", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationInstagram_pkey", + "schema": "public", + "table": "IntegrationInstagram", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationKlaviyo_pkey", + "schema": "public", + "table": "IntegrationKlaviyo", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMailchimp_pkey", + "schema": "public", + "table": "IntegrationMailchimp", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMailerLite_pkey", + "schema": "public", + "table": "IntegrationMailerLite", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMessenger_pkey", + "schema": "public", + "table": "IntegrationMessenger", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMetaCatalog_pkey", + "schema": "public", + "table": "IntegrationMetaCatalog", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationMoosend_pkey", + "schema": "public", + "table": "IntegrationMoosend", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOpenai_pkey", + "schema": "public", + "table": "IntegrationOpenai", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOpenaiCompatible_pkey", + "schema": "public", + "table": "IntegrationOpenaiCompatible", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOpenrouter_pkey", + "schema": "public", + "table": "IntegrationOpenrouter", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationOutlookCalendar_pkey", + "schema": "public", + "table": "IntegrationOutlookCalendar", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationSendGrid_pkey", + "schema": "public", + "table": "IntegrationSendGrid", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationSmtp_pkey", + "schema": "public", + "table": "IntegrationSmtp", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationTelegram_pkey", + "schema": "public", + "table": "IntegrationTelegram", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationThreads_pkey", + "schema": "public", + "table": "IntegrationThreads", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationTiktok_pkey", + "schema": "public", + "table": "IntegrationTiktok", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationWebchat_pkey", + "schema": "public", + "table": "IntegrationWebchat", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationWhatsapp_pkey", + "schema": "public", + "table": "IntegrationWhatsapp", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "IntegrationZalo_pkey", + "schema": "public", + "table": "IntegrationZalo", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Leaderboard_pkey", + "schema": "public", + "table": "Leaderboard", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "LeaderboardAuditLog_pkey", + "schema": "public", + "table": "LeaderboardAuditLog", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MagicLink_pkey", + "schema": "public", + "table": "MagicLink", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MediaLibraryFile_pkey", + "schema": "public", + "table": "MediaLibraryFile", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MediaLibraryFolder_pkey", + "schema": "public", + "table": "MediaLibraryFolder", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessageCleanup_pkey", + "schema": "public", + "table": "MessageCleanup", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessagingAdOperation_pkey", + "schema": "public", + "table": "MessagingAdOperation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessagingAdsConnection_pkey", + "schema": "public", + "table": "MessagingAdsConnection", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessengerMessageTemplate_pkey", + "schema": "public", + "table": "MessengerMessageTemplate", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MessengerWelcomeMessageFlow_pkey", + "schema": "public", + "table": "MessengerWelcomeMessageFlow", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MetaCapiEvent_pkey", + "schema": "public", + "table": "MetaCapiEvent", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MetaCatalogItem_pkey", + "schema": "public", + "table": "MetaCatalogItem", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MetaCatalogSyncRun_pkey", + "schema": "public", + "table": "MetaCatalogSyncRun", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniApp_pkey", + "schema": "public", + "table": "MiniApp", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniAppPublication_pkey", + "schema": "public", + "table": "MiniAppPublication", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniAppSubmission_pkey", + "schema": "public", + "table": "MiniAppSubmission", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MiniAppUpload_pkey", + "schema": "public", + "table": "MiniAppUpload", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Minigame_pkey", + "schema": "public", + "table": "Minigame", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MinigameContact_pkey", + "schema": "public", + "table": "MinigameContact", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "MinigamePlay_pkey", + "schema": "public", + "table": "MinigamePlay", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "DiscountCodeRedemption_pkey", + "schema": "public", + "table": "DiscountCodeRedemption", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "OrderItem_pkey", + "schema": "public", + "table": "OrderItem", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Order_pkey", + "schema": "public", + "table": "Order", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "OrderStatusHistory_pkey", + "schema": "public", + "table": "OrderStatusHistory", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Credential_pkey", + "schema": "public", + "table": "PlatformCredential", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Product_pkey", + "schema": "public", + "table": "Product", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductAddon_pkey", + "schema": "public", + "table": "ProductAddon", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductCategory_pkey", + "schema": "public", + "table": "ProductCategory", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductVariant_pkey", + "schema": "public", + "table": "ProductVariant", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ProductVariantOption_pkey", + "schema": "public", + "table": "ProductVariantOption", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "QuestionnaireAnswer_pkey", + "schema": "public", + "table": "QuestionnaireAnswer", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Questionnaire_pkey", + "schema": "public", + "table": "Questionnaire", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "QuestionnaireQuestion_pkey", + "schema": "public", + "table": "QuestionnaireQuestion", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "QuestionnaireSubmission_pkey", + "schema": "public", + "table": "QuestionnaireSubmission", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Reflink_pkey", + "schema": "public", + "table": "Reflink", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "ResponseSlaPolicy_pkey", + "schema": "public", + "table": "ResponseSlaPolicy", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SavedReply_pkey", + "schema": "public", + "table": "SavedReply", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SavedReplyImage_pkey", + "schema": "public", + "table": "SavedReplyImage", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Sequence_pkey", + "schema": "public", + "table": "Sequence", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SequenceStep_pkey", + "schema": "public", + "table": "SequenceStep", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Spreadsheet_pkey", + "schema": "public", + "table": "Spreadsheet", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "SystemField_pkey", + "schema": "public", + "table": "SystemField", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Tag_pkey", + "schema": "public", + "table": "Tag", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TagChannel_pkey", + "schema": "public", + "table": "TagChannel", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TelegramChat_pkey", + "schema": "public", + "table": "TelegramChat", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Template_pkey", + "schema": "public", + "table": "Template", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TemplateInstallation_pkey", + "schema": "public", + "table": "TemplateInstallation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TemplateInstalledResource_pkey", + "schema": "public", + "table": "TemplateInstalledResource", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Trigger_pkey", + "schema": "public", + "table": "Trigger", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Condition_pkey", + "schema": "public", + "table": "Condition", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TriggerExecution_pkey", + "schema": "public", + "table": "TriggerExecution", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "TriggerStat_pkey", + "schema": "public", + "table": "TriggerStat", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "UserDeviceToken_pkey", + "schema": "public", + "table": "UserDeviceToken", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "UserPersistentMenu_pkey", + "schema": "public", + "table": "UserPersistentMenu", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Vendor_pkey", + "schema": "public", + "table": "Vendor", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Webhook_pkey", + "schema": "public", + "table": "Webhook", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WebhookExecution_pkey", + "schema": "public", + "table": "WebhookExecution", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappBusinessAccount_pkey", + "schema": "public", + "table": "WhatsappBusinessAccount", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappCall_pkey", + "schema": "public", + "table": "WhatsappCall", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappCallPermission_pkey", + "schema": "public", + "table": "WhatsappCallPermission", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappCoexistStaging_pkey", + "schema": "public", + "table": "WhatsappCoexistStaging", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappFlow_pkey", + "schema": "public", + "table": "WhatsappFlow", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappMessageTemplate_pkey", + "schema": "public", + "table": "WhatsappMessageTemplate", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WhatsappSignupSession_pkey", + "schema": "public", + "table": "WhatsappSignupSession", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHours_pkey", + "schema": "public", + "table": "WorkingHours", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHoursDateOverride_pkey", + "schema": "public", + "table": "WorkingHoursDateOverride", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHoursInterval_pkey", + "schema": "public", + "table": "WorkingHoursInterval", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkingHoursMember_pkey", + "schema": "public", + "table": "WorkingHoursMember", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "Workspace_pkey", + "schema": "public", + "table": "Workspace", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceApiToken_pkey", + "schema": "public", + "table": "WorkspaceApiToken", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceBotMessageUsage_pkey", + "schema": "public", + "table": "WorkspaceBotMessageUsage", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceDeletionRecord_pkey", + "schema": "public", + "table": "WorkspaceDeletionRecord", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceMac_pkey", + "schema": "public", + "table": "WorkspaceMac", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "WorkspaceMember_pkey", + "schema": "public", + "table": "WorkspaceMember", + "entityType": "pks" + }, + { + "nameExplicit": true, + "columns": [ + "contactInboxId", + "sourceId", + "createdAt" + ], + "nullsNotDistinct": false, + "name": "Message_source_dedup_idx", + "entityType": "uniques", + "schema": "public", + "table": "Message" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId", + "parentId", + "name" + ], + "nullsNotDistinct": true, + "name": "ProductCategory_workspaceId_parent_name_key", + "entityType": "uniques", + "schema": "public", + "table": "ProductCategory" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "ResponseSlaPolicy_workspaceId_key", + "entityType": "uniques", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "nameExplicit": true, + "columns": [ + "token" + ], + "nullsNotDistinct": false, + "name": "UserDeviceToken_token_key", + "entityType": "uniques", + "schema": "public", + "table": "UserDeviceToken" + }, + { + "nameExplicit": true, + "columns": [ + "id", + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "WorkingHours_id_workspaceId_key", + "entityType": "uniques", + "schema": "public", + "table": "WorkingHours" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId", + "userId" + ], + "nullsNotDistinct": false, + "name": "WorkingHoursMember_workspaceId_userId_key", + "entityType": "uniques", + "schema": "public", + "table": "WorkingHoursMember" + }, + { + "nameExplicit": true, + "columns": [ + "tokenHash" + ], + "nullsNotDistinct": false, + "name": "WorkspaceApiToken_tokenHash_key", + "entityType": "uniques", + "schema": "public", + "table": "WorkspaceApiToken" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId", + "periodStart" + ], + "nullsNotDistinct": false, + "name": "WorkspaceBotMessageUsage_workspaceId_periodStart_key", + "entityType": "uniques", + "schema": "public", + "table": "WorkspaceBotMessageUsage" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "WorkspaceDeletionRecord_workspaceId_key", + "entityType": "uniques", + "schema": "public", + "table": "WorkspaceDeletionRecord" + }, + { + "nameExplicit": true, + "columns": [ + "workspaceId", + "periodStart", + "periodEnd" + ], + "nullsNotDistinct": false, + "name": "WorkspaceMac_workspaceId_periodStart_periodEnd_unique", + "entityType": "uniques", + "schema": "public", + "table": "WorkspaceMac" + }, + { + "nameExplicit": false, + "columns": [ + "userId" + ], + "nullsNotDistinct": false, + "name": "UserQuota_userId_key", + "schema": "public", + "table": "UserQuota", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "workspaceId" + ], + "nullsNotDistinct": false, + "name": "WorkspaceUsage_workspaceId_key", + "schema": "public", + "table": "WorkspaceUsage", + "entityType": "uniques" + }, + { + "value": "(\"channel\" = 'whatsapp' AND \"integrationWhatsappId\" IS NOT NULL AND \"ctwaClid\" IS NOT NULL AND \"wabaId\" IS NOT NULL) OR (\"channel\" = 'messenger' AND \"integrationMessengerId\" IS NOT NULL) OR (\"channel\" = 'instagram' AND \"integrationInstagramId\" IS NOT NULL)", + "name": "AdsConversionEvent_channel_integration_check", + "entityType": "checks", + "schema": "public", + "table": "AdsConversionEvent" + }, + { + "value": "\"parentBroadcastId\" IS NULL OR \"occurrenceAt\" IS NOT NULL", + "name": "Broadcast_occurrence_pair_check", + "entityType": "checks", + "schema": "public", + "table": "Broadcast" + }, + { + "value": "((\"actorUserId\" IS NOT NULL)::int + (\"actorTokenId\" IS NOT NULL)::int) <= 1", + "name": "ConnectSession_actor_at_most_one", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "\"status\" IN ('pending', 'authorized', 'awaiting_selection', 'completed', 'failed', 'expired', 'cancelled')", + "name": "ConnectSession_status_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "\"purpose\" IN ('connect', 'reconnect', 'facebook_ads', 'messaging_ads', 'lead_ads', 'meta_catalog')", + "name": "ConnectSession_purpose_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "\"errorCode\" IN ('state_mismatch', 'expired', 'provider_denied', 'exchange_failed', 'provider_error', 'no_candidates', 'already_connected', 'quota_exceeded', 'trial_expired', 'internal_error')", + "name": "ConnectSession_errorCode_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "\"errorCode\" IS NULL OR \"status\" IN ('failed', 'expired', 'cancelled')", + "name": "ConnectSession_errorCode_terminal_failure_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "(\"status\" IN ('completed', 'failed', 'expired', 'cancelled')) = (\"consumedAt\" IS NOT NULL)", + "name": "ConnectSession_terminal_consumedAt_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "\"status\" NOT IN ('completed', 'failed', 'expired', 'cancelled') OR \"encryptedAuth\" IS NULL", + "name": "ConnectSession_terminal_clears_encryptedAuth_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "\"purpose\" <> 'reconnect' OR \"status\" IN ('completed', 'failed', 'expired', 'cancelled') OR \"targetConnectionId\" IS NOT NULL", + "name": "ConnectSession_active_reconnect_requires_target_check", + "entityType": "checks", + "schema": "public", + "table": "ConnectSession" + }, + { + "value": "(\n (\"kind\" = 'channel' AND \"inboxId\" IS NOT NULL AND \"channel\" IS NOT NULL)\n OR\n (\"kind\" = 'integration' AND \"inboxId\" IS NULL AND \"channel\" IS NULL AND \"integrationId\" IS NOT NULL)\n )", + "name": "Connection_kind_relation_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "NOT (\"inboxId\" IS NOT NULL AND \"integrationId\" IS NOT NULL)", + "name": "Connection_inbox_integration_exclusive_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "\"kind\" IN ('channel', 'integration')", + "name": "Connection_kind_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "\"status\" IN ('connected', 'degraded', 'needs_reauth', 'paused', 'disconnected')", + "name": "Connection_status_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "\"statusReason\" IN ('manual', 'workspace_purge', 'trial_expired', 'tenant_suspended', 'token_revoked', 'provider_revoked', 'refresh_failed', 'verify_failed', 'quota_exceeded', 'orphaned_webhook')", + "name": "Connection_statusReason_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "(\"status\" = 'connected') = (\"statusReason\" IS NULL)", + "name": "Connection_status_reason_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "(\"status\" = 'disconnected') = (\"disconnectedAt\" IS NOT NULL)", + "name": "Connection_disconnectedAt_check", + "entityType": "checks", + "schema": "public", + "table": "Connection" + }, + { + "value": "(\"activityType\" = 'flowExecuted' AND \"referenceType\" = 'flow' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'flowNodeExecuted' AND \"referenceType\" = 'flowNode' AND \"parentReferenceId\" <> 0) OR (\"activityType\" = 'automatedResponseMatched' AND \"referenceType\" = 'automatedResponse' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'formCompleted' AND \"referenceType\" = 'whatsappFlow' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageSent' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageDelivered' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageOpened' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0) OR (\"activityType\" = 'messageClicked' AND \"referenceType\" = 'emailTopic' AND \"parentReferenceId\" = 0)", + "name": "ContactActivity_allowed_pair_check", + "entityType": "checks", + "schema": "public", + "table": "ContactActivity" + }, + { + "value": "\"usedCount\" >= 0 AND (\"usageLimit\" IS NULL OR \"usedCount\" <= \"usageLimit\")", + "name": "DiscountCode_usedCount_check", + "entityType": "checks", + "schema": "public", + "table": "DiscountCode" + }, + { + "value": "\"serviceFeePercent\" >= 0 AND \"serviceFeePercent\" <= 100", + "name": "EcommerceSettings_serviceFeePercent_check", + "entityType": "checks", + "schema": "public", + "table": "EcommerceSettings" + }, + { + "value": "\"status\" NOT IN ('sent', 'processed') OR (\"requestId\" IS NOT NULL AND \"sentAt\" IS NOT NULL)", + "name": "GoogleAdsConversionEvent_sent_requires_request_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "\"status\" <> 'sending' OR (\"claimToken\" IS NOT NULL AND \"claimedAt\" IS NOT NULL)", + "name": "GoogleAdsConversionEvent_sending_requires_claim_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "\"processingStatus\" IS NULL OR \"status\" IN ('sent', 'processed', 'failed')", + "name": "GoogleAdsConversionEvent_processing_status_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "\"failureStage\" IS NULL OR \"status\" = 'failed'", + "name": "GoogleAdsConversionEvent_failure_stage_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "(\"value\" IS NULL) = (\"currency\" IS NULL)", + "name": "GoogleAdsConversionEvent_value_currency_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "\"value\" IS NULL OR \"value\" >= 0", + "name": "GoogleAdsConversionEvent_value_non_negative_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "length(\"clickId\") BETWEEN 10 AND 512", + "name": "GoogleAdsConversionEvent_clickId_length_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "\"uploadMethod\" IN ('dataManager', 'legacy')", + "name": "GoogleAdsConversionEvent_uploadMethod_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "\"attempt\" >= 0 AND \"processingAttempts\" >= 0", + "name": "GoogleAdsConversionEvent_attempt_check", + "entityType": "checks", + "schema": "public", + "table": "GoogleAdsConversionEvent" + }, + { + "value": "(\"registrationStatus\" <> 'failed' OR \"registrationError\" IS NOT NULL)\n AND (\"registrationStatus\" <> 'registered' OR \"registrationError\" IS NULL)", + "name": "IntegrationWhatsapp_registrationStatus_error_consistent", + "entityType": "checks", + "schema": "public", + "table": "IntegrationWhatsapp" + }, + { + "value": "(\"channel\" = 'whatsapp' AND \"integrationWhatsappId\" IS NOT NULL AND \"integrationMessengerId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'messenger' AND \"integrationMessengerId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'instagram' AND \"integrationInstagramId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationMessengerId\" IS NULL)", + "name": "MessagingAdOperation_channel_integration_check", + "entityType": "checks", + "schema": "public", + "table": "MessagingAdOperation" + }, + { + "value": "(\"channel\" = 'whatsapp' AND \"integrationWhatsappId\" IS NOT NULL AND \"integrationMessengerId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'messenger' AND \"integrationMessengerId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationInstagramId\" IS NULL) OR (\"channel\" = 'instagram' AND \"integrationInstagramId\" IS NOT NULL AND \"integrationWhatsappId\" IS NULL AND \"integrationMessengerId\" IS NULL)", + "name": "MessagingAdsConnection_channel_integration_check", + "entityType": "checks", + "schema": "public", + "table": "MessagingAdsConnection" + }, + { + "value": "\"channel\" IN ('messenger', 'instagram', 'whatsapp')", + "name": "MetaCapiEvent_channel_check", + "entityType": "checks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "value": "\"actionSource\" IN ('business_messaging', 'email', 'phone_call', 'chat', 'physical_store', 'system_generated', 'other')", + "name": "MetaCapiEvent_actionSource_check", + "entityType": "checks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "value": "\"contentType\" IN ('product', 'product_group')", + "name": "MetaCapiEvent_contentType_check", + "entityType": "checks", + "schema": "public", + "table": "MetaCapiEvent" + }, + { + "value": "(\"customFieldId\" IS NULL) OR (\"systemFieldKey\" IS NULL)", + "name": "QuestionnaireQuestion_customFieldId_systemFieldKey_exclusive", + "entityType": "checks", + "schema": "public", + "table": "QuestionnaireQuestion" + }, + { + "value": "\"firstResponseTargetSeconds\" > 0 AND (\"nextResponseTargetSeconds\" IS NULL OR \"nextResponseTargetSeconds\" > 0)", + "name": "ResponseSlaPolicy_targets_check", + "entityType": "checks", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "value": "\"breachingThresholdPercent\" BETWEEN 1 AND 99", + "name": "ResponseSlaPolicy_threshold_check", + "entityType": "checks", + "schema": "public", + "table": "ResponseSlaPolicy" + }, + { + "value": "\"discountPercent\" >= 0 AND \"discountPercent\" <= 100", + "name": "Vendor_discountPercent_check", + "entityType": "checks", + "schema": "public", + "table": "Vendor" + }, + { + "value": "cardinality(\"candidatePhoneNumberIds\") > 0", + "name": "WhatsappSignupSession_candidates_not_empty", + "entityType": "checks", + "schema": "public", + "table": "WhatsappSignupSession" + }, + { + "value": "\"weekday\" BETWEEN 0 AND 6", + "name": "WorkingHoursInterval_weekday_check", + "entityType": "checks", + "schema": "public", + "table": "WorkingHoursInterval" + }, + { + "value": "0 <= \"startMinute\" AND \"startMinute\" < \"endMinute\" AND \"endMinute\" <= 1440", + "name": "WorkingHoursInterval_minutes_check", + "entityType": "checks", + "schema": "public", + "table": "WorkingHoursInterval" + } + ], + "renames": [] +} \ No newline at end of file diff --git a/packages/database/package.json b/packages/database/package.json index c1479e11d4..6e9be04596 100644 --- a/packages/database/package.json +++ b/packages/database/package.json @@ -66,7 +66,13 @@ "./repositories": "./src/repositories/index.ts", "./repositories/contact-activity": "./src/repositories/contact-activity/index.ts", "./repositories/contact-inbox-post": "./src/repositories/contact-inbox-post/index.ts", + "./repositories/tenant": "./src/repositories/tenant/index.ts", "./repositories/workspace": "./src/repositories/workspace/index.ts", + "./repositories/workspace-mac": "./src/repositories/workspace-mac/index.ts", + "./repositories/workspace-bot-message-usage": "./src/repositories/workspace-bot-message-usage/index.ts", + "./repositories/workspace-deletion-record": "./src/repositories/workspace-deletion-record/index.ts", + "./repositories/sequence": "./src/repositories/sequence/index.ts", + "./repositories/sequence-dispatch": "./src/repositories/sequence-dispatch/index.ts", "./schema": "./src/schema/index.ts", "./types": "./src/types.ts", "./utils": "./src/utils.ts" diff --git a/packages/database/scripts/backfill-workspace-mac-owner.mjs b/packages/database/scripts/backfill-workspace-mac-owner.mjs new file mode 100644 index 0000000000..56f66299c8 --- /dev/null +++ b/packages/database/scripts/backfill-workspace-mac-owner.mjs @@ -0,0 +1,110 @@ +/** + * Backfill owner and tenant attribution for retained WorkspaceMac billing rows. + * + * Rows are processed in small, id-keyed transactions. The old workspace FK means + * every pre-migration row still has a live Workspace to supply its ownership. + * + * Usage: + * DATABASE_URL=postgres://... node ./scripts/backfill-workspace-mac-owner.mjs + * DATABASE_URL=... DRY_RUN=1 node ./scripts/backfill-workspace-mac-owner.mjs + * DATABASE_URL=... BATCH_SIZE=1000 node ./scripts/backfill-workspace-mac-owner.mjs + */ +import { pathToFileURL } from "node:url" +import { Pool } from "pg" + +const LOCK_TIMEOUT_MS = 5000 +const DEFAULT_BATCH_SIZE = 1000 +const PAUSE_BETWEEN_BATCHES_MS = 50 + +const FILLABLE_PREDICATE = '"ownerId" IS NULL OR "tenantId" IS NULL' + +export const COUNT_SQL = ` + SELECT count(*)::bigint AS remaining + FROM "WorkspaceMac" + WHERE ${FILLABLE_PREDICATE} +` + +export const BATCH_SQL = ` + WITH batch AS ( + SELECT "id" + FROM "WorkspaceMac" + WHERE ${FILLABLE_PREDICATE} + AND "id" > $1::bigint + ORDER BY "id" + LIMIT $2 + ) + UPDATE "WorkspaceMac" AS target + SET + "ownerId" = COALESCE(target."ownerId", workspace."ownerId"), + "tenantId" = COALESCE(target."tenantId", workspace."tenantId") + FROM batch, "Workspace" AS workspace + WHERE target."id" = batch."id" + AND workspace."id" = target."workspaceId" + RETURNING target."id" +` + +const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) + +/** @returns {Promise<{ remaining: number, updated: number }>} */ +export async function backfillWorkspaceMacOwner( + pool, + { batchSize = DEFAULT_BATCH_SIZE, dryRun = false } = {}, +) { + if (dryRun) { + const { rows } = await pool.query(COUNT_SQL) + return { remaining: Number(rows[0].remaining), updated: 0 } + } + + let updated = 0 + let lastId = "0" + for (;;) { + const client = await pool.connect() + let ids + try { + await client.query("BEGIN") + await client.query(`SET LOCAL lock_timeout = '${LOCK_TIMEOUT_MS}ms'`) + const result = await client.query(BATCH_SQL, [lastId, batchSize]) + await client.query("COMMIT") + ids = result.rows.map((row) => BigInt(row.id)) + } catch (error) { + await client.query("ROLLBACK").catch(() => undefined) + throw error + } finally { + client.release() + } + + if (ids.length === 0) { + break + } + + updated += ids.length + lastId = ids.reduce((max, id) => (id > max ? id : max), 0n).toString() + await sleep(PAUSE_BETWEEN_BATCHES_MS) + } + + const { rows } = await pool.query(COUNT_SQL) + return { remaining: Number(rows[0].remaining), updated } +} + +const isMain = process.argv[1] + ? import.meta.url === pathToFileURL(process.argv[1]).href + : false + +if (isMain) { + const databaseUrl = process.env.DATABASE_URL + if (!databaseUrl) { + console.error("DATABASE_URL is required.") + process.exit(1) + } + + const pool = new Pool({ connectionString: databaseUrl }) + try { + const result = await backfillWorkspaceMacOwner(pool, { + batchSize: Number(process.env.BATCH_SIZE) || DEFAULT_BATCH_SIZE, + dryRun: Boolean(process.env.DRY_RUN), + }) + console.log(JSON.stringify(result)) + } finally { + await pool.end() + } +} diff --git a/packages/database/src/relations/index.ts b/packages/database/src/relations/index.ts index 73ccb08dd9..2f989676b7 100644 --- a/packages/database/src/relations/index.ts +++ b/packages/database/src/relations/index.ts @@ -170,6 +170,8 @@ import { whatsappSignupSessionRelations } from "./whatsapp-signup-session" import { workingHoursRelations } from "./working-hours" import { workspaceRelations } from "./workspace" import { workspaceApiTokenRelations } from "./workspace-api-token" +import { workspaceBotMessageUsageRelations } from "./workspace-bot-message-usage" +import { workspaceDeletionRecordRelations } from "./workspace-deletion-record" import { workspaceMemberRelations } from "./workspace-member" export const relations = { @@ -193,6 +195,8 @@ export const relations = { ...userRelations, ...workspaceRelations, ...workspaceApiTokenRelations, + ...workspaceBotMessageUsageRelations, + ...workspaceDeletionRecordRelations, ...aiAgentRelations, ...aiConversationSourceRelations, ...aiFileRelations, diff --git a/packages/database/src/relations/workspace-bot-message-usage.ts b/packages/database/src/relations/workspace-bot-message-usage.ts new file mode 100644 index 0000000000..f659b81de7 --- /dev/null +++ b/packages/database/src/relations/workspace-bot-message-usage.ts @@ -0,0 +1,15 @@ +import { defineRelationsPart } from "drizzle-orm" +// biome-ignore lint/performance/noNamespaceImport: drizzle schema +import * as schema from "../schema" + +export const workspaceBotMessageUsageRelations = defineRelationsPart( + schema, + (r) => ({ + workspaceBotMessageUsageModel: { + owner: r.one.userModel({ + from: r.workspaceBotMessageUsageModel.ownerId, + to: r.userModel.id, + }), + }, + }), +) diff --git a/packages/database/src/relations/workspace-deletion-record.ts b/packages/database/src/relations/workspace-deletion-record.ts new file mode 100644 index 0000000000..784d8e93d8 --- /dev/null +++ b/packages/database/src/relations/workspace-deletion-record.ts @@ -0,0 +1,9 @@ +import { defineRelationsPart } from "drizzle-orm" +// biome-ignore lint/performance/noNamespaceImport: drizzle schema +import * as schema from "../schema" + +// This retained evidence table deliberately has no foreign keys. +export const workspaceDeletionRecordRelations = defineRelationsPart( + schema, + () => ({ workspaceDeletionRecordModel: {} }), +) diff --git a/packages/database/src/repositories/index.ts b/packages/database/src/repositories/index.ts index 895b4737ec..5542917190 100644 --- a/packages/database/src/repositories/index.ts +++ b/packages/database/src/repositories/index.ts @@ -75,6 +75,7 @@ export * from "./sequence-dispatch" export * from "./tag-channel" export * from "./telegram-chat" export * from "./template-selectable-resource" +export * from "./tenant" export * from "./trigger" export * from "./user" export * from "./user-persistent-menu" @@ -89,4 +90,6 @@ export * from "./whatsapp-message-template" export * from "./working-hours" export * from "./workspace" export * from "./workspace-api-token" +export * from "./workspace-mac" export * from "./workspace-member" +export * from "./workspace-purge" diff --git a/packages/database/src/repositories/sequence-dispatch/repository.ts b/packages/database/src/repositories/sequence-dispatch/repository.ts index b2a5995b7f..8a11645da6 100644 --- a/packages/database/src/repositories/sequence-dispatch/repository.ts +++ b/packages/database/src/repositories/sequence-dispatch/repository.ts @@ -168,6 +168,26 @@ export const sequenceDispatchRepository = { return result.rows.length }, + async cancelPendingBatchForWorkspace( + input: { workspaceId: string; limit: number }, + tx: DatabaseClient = db, + ): Promise<{ id: string; bucket: number }[]> { + const result = await tx.execute<{ id: string; bucket: number }>(sql` + UPDATE "SequenceDispatch" + SET "status" = 'canceled', "updatedAt" = NOW() + WHERE ("id", "workspaceId") IN ( + SELECT "id", "workspaceId" + FROM "SequenceDispatch" + WHERE "workspaceId" = ${input.workspaceId} + AND "status" = 'pending' + LIMIT ${input.limit} + FOR UPDATE SKIP LOCKED + ) + RETURNING "id", "bucket" + `) + return result.rows + }, + /** `step-executor.service.ts` fetchStep. */ async findStepWithFlow( input: { id: string }, diff --git a/packages/database/src/repositories/sequence/repository.ts b/packages/database/src/repositories/sequence/repository.ts index b0e37e7369..3fde44e605 100644 --- a/packages/database/src/repositories/sequence/repository.ts +++ b/packages/database/src/repositories/sequence/repository.ts @@ -1,4 +1,10 @@ -import { type DatabaseClient, db, eq, relationsFilterToSQL } from "../../client" +import { + type DatabaseClient, + db, + eq, + relationsFilterToSQL, + sql, +} from "../../client" import { rootFolderId } from "../../partials" import { contactsOnSequenceModel, @@ -103,4 +109,29 @@ export const sequenceRepository = { }, }) }, + + async completeActiveEnrollmentBatch( + input: { workspaceId: string; limit: number }, + tx: DatabaseClient, + ): Promise { + const result = await tx.execute(sql` + UPDATE "ContactOnSequence" + SET + "status" = 'completed', + "completedAt" = NOW(), + "nextRunAt" = NULL, + "nextStepId" = NULL, + "updatedAt" = NOW() + WHERE "id" IN ( + SELECT "id" + FROM "ContactOnSequence" + WHERE "workspaceId" = ${input.workspaceId} + AND "status" = 'active' + LIMIT ${input.limit} + FOR UPDATE SKIP LOCKED + ) + RETURNING "id" + `) + return result.rowCount ?? 0 + }, } diff --git a/packages/database/src/repositories/tenant/index.ts b/packages/database/src/repositories/tenant/index.ts new file mode 100644 index 0000000000..b1d08c5baf --- /dev/null +++ b/packages/database/src/repositories/tenant/index.ts @@ -0,0 +1 @@ +export * from "./repository" diff --git a/packages/database/src/repositories/tenant/repository.ts b/packages/database/src/repositories/tenant/repository.ts new file mode 100644 index 0000000000..31894a3bd0 --- /dev/null +++ b/packages/database/src/repositories/tenant/repository.ts @@ -0,0 +1,19 @@ +import { type DatabaseClient, db } from "../../client" + +class TenantRepository { + async findById(tenantId: string, client: DatabaseClient = db) { + return await client.query.tenantModel.findFirst({ + where: { id: tenantId }, + columns: { id: true, ownerId: true, status: true }, + }) + } + + async findByOwner(ownerId: string, client: DatabaseClient = db) { + return await client.query.tenantModel.findFirst({ + where: { ownerId }, + columns: { id: true, ownerId: true, status: true }, + }) + } +} + +export const tenantRepository = new TenantRepository() diff --git a/packages/database/src/repositories/workspace-bot-message-usage/index.ts b/packages/database/src/repositories/workspace-bot-message-usage/index.ts new file mode 100644 index 0000000000..b1d08c5baf --- /dev/null +++ b/packages/database/src/repositories/workspace-bot-message-usage/index.ts @@ -0,0 +1 @@ +export * from "./repository" diff --git a/packages/database/src/repositories/workspace-bot-message-usage/repository.ts b/packages/database/src/repositories/workspace-bot-message-usage/repository.ts new file mode 100644 index 0000000000..3638e28f44 --- /dev/null +++ b/packages/database/src/repositories/workspace-bot-message-usage/repository.ts @@ -0,0 +1,33 @@ +import { type DatabaseClient, db, sql } from "../../client" +import { workspaceBotMessageUsageModel } from "../../schema" + +class WorkspaceBotMessageUsageRepository { + async increment( + input: { + count: number + ownerId: string + periodEnd: Date + periodStart: Date + tenantId: string + workspaceId: string + }, + client: DatabaseClient = db, + ): Promise { + await client + .insert(workspaceBotMessageUsageModel) + .values(input) + .onConflictDoUpdate({ + target: [ + workspaceBotMessageUsageModel.workspaceId, + workspaceBotMessageUsageModel.periodStart, + ], + set: { + count: sql`${workspaceBotMessageUsageModel.count} + ${input.count}`, + updatedAt: sql`now()`, + }, + }) + } +} + +export const workspaceBotMessageUsageRepository = + new WorkspaceBotMessageUsageRepository() diff --git a/packages/database/src/repositories/workspace-deletion-record/index.ts b/packages/database/src/repositories/workspace-deletion-record/index.ts new file mode 100644 index 0000000000..b1d08c5baf --- /dev/null +++ b/packages/database/src/repositories/workspace-deletion-record/index.ts @@ -0,0 +1 @@ +export * from "./repository" diff --git a/packages/database/src/repositories/workspace-deletion-record/repository.ts b/packages/database/src/repositories/workspace-deletion-record/repository.ts new file mode 100644 index 0000000000..7602565c5d --- /dev/null +++ b/packages/database/src/repositories/workspace-deletion-record/repository.ts @@ -0,0 +1,221 @@ +import { + and, + count, + type DatabaseClient, + db, + desc, + eq, + ilike, + or, +} from "../../client" +import { + contactModel, + inboxModel, + userModel, + workspaceBotMessageUsageModel, + workspaceDeletionRecordModel, + workspaceMacModel, + workspaceMemberModel, +} from "../../schema" +import type { + WorkspaceDeletionRecordDetails, + WorkspaceDeletionRecordUsageSnapshot, +} from "../../schema/workspace-deletion-record" + +type CreateInput = { + deletionRequestedAt: Date | null + deletionRequestedByEmail: string | null + deletionRequestedById: string | null + details: WorkspaceDeletionRecordDetails + ownerEmail: string | null + ownerId: string + scheduledDeletionAt: Date | null + tenantId: string + usageSnapshot: WorkspaceDeletionRecordUsageSnapshot + workspaceId: string + workspaceName: string +} + +class WorkspaceDeletionRecordRepository { + async readSnapshotSources( + input: { ownerId: string; workspaceId: string }, + client: DatabaseClient = db, + ) { + const workspace = await client.query.workspaceModel.findFirst({ + where: { id: input.workspaceId }, + }) + if (!workspace) { + return + } + + const [ + owner, + requestedBy, + members, + inboxes, + mac, + botMessages, + contacts, + quota, + ] = await Promise.all([ + client.query.userModel.findFirst({ + where: { id: input.ownerId }, + columns: { email: true, name: true, tenantId: true }, + }), + workspace.deletionRequestedById + ? client.query.userModel.findFirst({ + where: { id: workspace.deletionRequestedById }, + columns: { email: true, name: true }, + }) + : undefined, + client + .select({ + email: userModel.email, + name: userModel.name, + role: workspaceMemberModel.role, + userId: workspaceMemberModel.userId, + }) + .from(workspaceMemberModel) + .innerJoin(userModel, eq(workspaceMemberModel.userId, userModel.id)) + .where(eq(workspaceMemberModel.workspaceId, input.workspaceId)), + client + .select({ + channel: inboxModel.channel, + id: inboxModel.id, + name: inboxModel.name, + status: inboxModel.status, + }) + .from(inboxModel) + .where(eq(inboxModel.workspaceId, input.workspaceId)), + client + .select({ + count: workspaceMacModel.macCount, + periodEnd: workspaceMacModel.periodEnd, + periodStart: workspaceMacModel.periodStart, + }) + .from(workspaceMacModel) + .where(eq(workspaceMacModel.workspaceId, input.workspaceId)), + client + .select({ + count: workspaceBotMessageUsageModel.count, + periodEnd: workspaceBotMessageUsageModel.periodEnd, + periodStart: workspaceBotMessageUsageModel.periodStart, + }) + .from(workspaceBotMessageUsageModel) + .where( + eq(workspaceBotMessageUsageModel.workspaceId, input.workspaceId), + ), + client.$count( + contactModel, + eq(contactModel.workspaceId, input.workspaceId), + ), + client.query.userQuotaModel.findFirst({ + where: { userId: input.ownerId }, + columns: { + botMessagesUsed: true, + macUsed: true, + monthlyBotMessagesUsed: true, + periodEnd: true, + periodStart: true, + planName: true, + planStatus: true, + }, + }), + ]) + + return { + botMessages, + contacts, + inboxes, + mac, + members, + owner, + quota, + requestedBy, + workspace, + } + } + + async insertIfAbsent( + input: CreateInput, + client: DatabaseClient = db, + ): Promise { + const [record] = await client + .insert(workspaceDeletionRecordModel) + .values(input) + .onConflictDoNothing() + .returning({ id: workspaceDeletionRecordModel.id }) + return Boolean(record) + } + + async markPurged( + workspaceId: string, + client: DatabaseClient = db, + ): Promise { + await client + .update(workspaceDeletionRecordModel) + .set({ purgedAt: new Date() }) + .where(eq(workspaceDeletionRecordModel.workspaceId, workspaceId)) + } + + async listForOwner(input: { + ownerId: string + limit: number + offset: number + }) { + const where = eq(workspaceDeletionRecordModel.ownerId, input.ownerId) + const [data, total] = await Promise.all([ + db + .select() + .from(workspaceDeletionRecordModel) + .where(where) + .orderBy(desc(workspaceDeletionRecordModel.createdAt)) + .limit(input.limit) + .offset(input.offset), + db + .select({ value: count() }) + .from(workspaceDeletionRecordModel) + .where(where), + ]) + return { data, total: total[0]?.value ?? 0 } + } + + async listForAdmin(input: { + limit: number + offset: number + search?: string + tenantId?: string + }) { + const where = and( + input.tenantId + ? eq(workspaceDeletionRecordModel.tenantId, input.tenantId) + : undefined, + input.search + ? or( + ilike( + workspaceDeletionRecordModel.workspaceName, + `%${input.search}%`, + ), + ilike(workspaceDeletionRecordModel.ownerEmail, `%${input.search}%`), + ) + : undefined, + ) + const [data, total] = await Promise.all([ + db + .select() + .from(workspaceDeletionRecordModel) + .where(where) + .orderBy(desc(workspaceDeletionRecordModel.createdAt)) + .limit(input.limit) + .offset(input.offset), + db + .select({ value: count() }) + .from(workspaceDeletionRecordModel) + .where(where), + ]) + return { data, total: total[0]?.value ?? 0 } + } +} + +export const workspaceDeletionRecordRepository = + new WorkspaceDeletionRecordRepository() diff --git a/packages/database/src/repositories/workspace-mac/index.ts b/packages/database/src/repositories/workspace-mac/index.ts new file mode 100644 index 0000000000..b1d08c5baf --- /dev/null +++ b/packages/database/src/repositories/workspace-mac/index.ts @@ -0,0 +1 @@ +export * from "./repository" diff --git a/packages/database/src/repositories/workspace-mac/repository.ts b/packages/database/src/repositories/workspace-mac/repository.ts new file mode 100644 index 0000000000..75c169e082 --- /dev/null +++ b/packages/database/src/repositories/workspace-mac/repository.ts @@ -0,0 +1,83 @@ +import { + and, + type DatabaseClient, + db, + eq, + gt, + inArray, + isNull, + lte, + or, + sql, + sum, +} from "../../client" +import { workspaceMacModel, workspaceModel } from "../../schema" + +class WorkspaceMacRepository { + async sumForTenant( + tenantId: string, + client: DatabaseClient = db, + ): Promise { + const tenantWorkspaces = client + .select({ id: workspaceModel.id }) + .from(workspaceModel) + .where(eq(workspaceModel.tenantId, tenantId)) + const [row] = await client + .select({ total: sum(workspaceMacModel.macCount) }) + .from(workspaceMacModel) + .where( + and( + or( + eq(workspaceMacModel.tenantId, tenantId), + and( + isNull(workspaceMacModel.tenantId), + inArray(workspaceMacModel.workspaceId, tenantWorkspaces), + ), + ), + lte(workspaceMacModel.periodStart, sql`now()`), + gt(workspaceMacModel.periodEnd, sql`now()`), + ), + ) + + return Number(row?.total ?? 0) + } + + async sumForOwner( + input: { + ownerId: string + periodStart: Date | null + cumulative: boolean + }, + client: DatabaseClient = db, + ): Promise { + if (!(input.cumulative || input.periodStart)) { + return 0 + } + + const ownedWorkspaces = client + .select({ id: workspaceModel.id }) + .from(workspaceModel) + .where(eq(workspaceModel.ownerId, input.ownerId)) + const conditions = [ + or( + eq(workspaceMacModel.ownerId, input.ownerId), + and( + isNull(workspaceMacModel.ownerId), + inArray(workspaceMacModel.workspaceId, ownedWorkspaces), + ), + ), + ] + if (!input.cumulative && input.periodStart) { + conditions.push(eq(workspaceMacModel.periodStart, input.periodStart)) + } + + const [row] = await client + .select({ total: sum(workspaceMacModel.macCount) }) + .from(workspaceMacModel) + .where(and(...conditions)) + + return Number(row?.total ?? 0) + } +} + +export const workspaceMacRepository = new WorkspaceMacRepository() diff --git a/packages/database/src/repositories/workspace-purge/index.ts b/packages/database/src/repositories/workspace-purge/index.ts new file mode 100644 index 0000000000..bebeb538ba --- /dev/null +++ b/packages/database/src/repositories/workspace-purge/index.ts @@ -0,0 +1,214 @@ +export * from "./tables" + +import { + and, + type DatabaseClient, + db, + eq, + inArray, + liftDecompressionLimit, + sql, +} from "../../client" +import { attachmentModel, messageModel } from "../../schema" +import type { + HeavyWorkspaceTable, + PartitionedWorkspaceTable, + WorkspaceAnalyticsHypertable, + WorkspacePurgeTable, +} from "./tables" + +const quotedTable = (table: string) => sql.raw(`"${table}"`) +const quotedColumns = (columns: readonly string[]) => + sql.join( + columns.map((column) => sql.raw(`"${column}"`)), + sql`, `, + ) + +const deleteWorkspaceRowsBatch = async ( + table: + | HeavyWorkspaceTable + | "CoexistSyncRun" + | "FlowAnalyticsSession" + | "MessageCleanup", + workspaceId: string, + limit: number, + tx: DatabaseClient = db, +): Promise => { + const tableSql = quotedTable(table) + const result = await tx.execute(sql` + DELETE FROM ${tableSql} + WHERE "ctid" IN ( + SELECT "ctid" + FROM ${tableSql} + WHERE "workspaceId" = ${workspaceId} + LIMIT ${limit} + FOR UPDATE SKIP LOCKED + ) + `) + return result.rowCount ?? 0 +} + +const hasWorkspaceRows = async ( + table: WorkspacePurgeTable, + workspaceId: string, + tx: DatabaseClient = db, +): Promise => { + const result = await tx.execute(sql` + SELECT 1 + FROM ${quotedTable(table)} + WHERE "workspaceId" = ${workspaceId} + LIMIT 1 + `) + return result.rows.length > 0 +} + +const deletePartitionedBatch = async ( + spec: PartitionedWorkspaceTable, + workspaceId: string, + limit: number, + tx: DatabaseClient = db, +): Promise => { + const columns = quotedColumns(spec.primaryKey) + const table = quotedTable(spec.table) + const result = + spec.selector === "broadcastWorkspace" + ? await tx.execute(sql` + DELETE FROM ${table} + WHERE (${columns}) IN ( + SELECT ${sql.join( + spec.primaryKey.map( + (column) => sql`recipient.${sql.raw(`"${column}"`)}`, + ), + sql`, `, + )} + FROM "ContactOnBroadcast" AS recipient + INNER JOIN "Broadcast" AS broadcast + ON broadcast."id" = recipient."broadcastId" + WHERE broadcast."workspaceId" = ${workspaceId} + LIMIT ${limit} + FOR UPDATE OF recipient SKIP LOCKED + ) + `) + : await tx.execute(sql` + DELETE FROM ${table} + WHERE (${columns}) IN ( + SELECT ${columns} + FROM ${table} + WHERE "workspaceId" = ${workspaceId} + LIMIT ${limit} + FOR UPDATE SKIP LOCKED + ) + `) + return result.rowCount ?? 0 +} + +const hasPartitionedWorkspaceRows = async ( + spec: PartitionedWorkspaceTable, + workspaceId: string, + tx: DatabaseClient = db, +): Promise => { + const result = + spec.selector === "broadcastWorkspace" + ? await tx.execute(sql` + SELECT 1 + FROM "ContactOnBroadcast" AS recipient + INNER JOIN "Broadcast" AS broadcast + ON broadcast."id" = recipient."broadcastId" + WHERE broadcast."workspaceId" = ${workspaceId} + LIMIT 1 + `) + : await tx.execute(sql` + SELECT 1 + FROM ${quotedTable(spec.table)} + WHERE "workspaceId" = ${workspaceId} + LIMIT 1 + `) + return result.rows.length > 0 +} + +const findNextAnalyticsRowAt = async ( + table: WorkspaceAnalyticsHypertable, + workspaceId: string, + tx: DatabaseClient = db, +): Promise => { + const result = await tx.execute<{ occurredAt: string }>(sql` + SELECT "occurredAt" + FROM ${quotedTable(table)} + WHERE "workspaceId" = ${workspaceId} + ORDER BY "occurredAt" ASC + LIMIT 1 + `) + const occurredAt = result.rows[0]?.occurredAt + return occurredAt ? new Date(occurredAt) : null +} + +const deleteAnalyticsSlice = async ( + table: WorkspaceAnalyticsHypertable, + workspaceId: string, + from: Date, + to: Date, + tx: DatabaseClient = db, +): Promise => { + await liftDecompressionLimit(tx) + const result = await tx.execute(sql` + DELETE FROM ${quotedTable(table)} + WHERE "workspaceId" = ${workspaceId} + AND "occurredAt" >= ${from} + AND "occurredAt" < ${to} + `) + return result.rowCount ?? 0 +} + +const listMessageConversationPage = async ( + table: "Message" | "Attachment", + workspaceId: string, + limit: number, + tx: DatabaseClient = db, +): Promise => { + const result = await tx.execute<{ conversationId: string }>(sql` + SELECT DISTINCT "conversationId" + FROM ${quotedTable(table)} + WHERE "workspaceId" = ${workspaceId} + ORDER BY "conversationId" ASC + LIMIT ${limit} + `) + return result.rows.map((row) => row.conversationId) +} + +const deleteMessagesAndAttachments = async ( + workspaceId: string, + conversationIds: string[], + tx: DatabaseClient = db, +): Promise => { + await liftDecompressionLimit(tx) + const [messages, attachments] = await Promise.all([ + tx + .delete(messageModel) + .where( + and( + eq(messageModel.workspaceId, workspaceId), + inArray(messageModel.conversationId, conversationIds), + ), + ), + tx + .delete(attachmentModel) + .where( + and( + eq(attachmentModel.workspaceId, workspaceId), + inArray(attachmentModel.conversationId, conversationIds), + ), + ), + ]) + return (messages.rowCount ?? 0) + (attachments.rowCount ?? 0) +} + +export const workspacePurgeRepository = { + deleteAnalyticsSlice, + deleteMessagesAndAttachments, + deletePartitionedBatch, + deleteWorkspaceRowsBatch, + findNextAnalyticsRowAt, + hasPartitionedWorkspaceRows, + hasWorkspaceRows, + listMessageConversationPage, +} diff --git a/packages/database/src/repositories/workspace-purge/tables.ts b/packages/database/src/repositories/workspace-purge/tables.ts new file mode 100644 index 0000000000..d33e82d53e --- /dev/null +++ b/packages/database/src/repositories/workspace-purge/tables.ts @@ -0,0 +1,121 @@ +export const HEAVY_WORKSPACE_TABLES = [ + "ErrorLog", + "AuditLog", + "InboundWebhookRequest", + "CommentAutomationEvent", + "CommentAutomationReply", + "TriggerStat", + "FlowNodeStat", + "MagicLinkStat", + "RefLinkStat", + "MetaCapiEvent", + "AdsConversionEvent", + "GoogleAdsConversionEvent", + "LeaderboardAuditLog", + "LeaderboardParticipant", + "AIConversationEmbedding", + "AIEmbedding", + "TriggerExecution", + "FlowRun", + "FlowVersion", + "ContactOnSmartDelay", + "Conversation", + "Contact", +] as const + +export const PARTITIONED_WORKSPACE_TABLES = [ + { + primaryKey: ["broadcastId", "contactId"], + selector: "broadcastWorkspace", + table: "ContactOnBroadcast", + }, + { + primaryKey: ["id", "workspaceId"], + selector: "workspace", + table: "SequenceDispatch", + }, + { + primaryKey: ["workspaceId", "hourBucket", "contactInboxId"], + selector: "workspace", + table: "ContactActiveHourly", + }, + { + primaryKey: ["workspaceId", "periodStart", "contactInboxId"], + selector: "workspace", + table: "ContactActiveMonthly", + }, +] as const + +export const WORKSPACE_ANALYTICS_HYPERTABLES = [ + "AnalyticsAgentResponseEvent", + "AnalyticsBotMessageEvent", + "AnalyticsBroadcastEvent", + "AnalyticsContactEvent", + "AnalyticsConversationEvent", + "AnalyticsFlowNodeEvent", + "AnalyticsMessageEvent", + "AnalyticsSequenceEvent", +] as const +export const NO_FK_WORKSPACE_TABLES = [ + { + stage: "ctid", + table: "CoexistSyncRun", + }, + { + stage: "contactActivity", + table: "ContactActivity", + }, + { + stage: "contactActivity", + table: "ContactKeywordMessage", + }, + { + stage: "contactActivity", + table: "ContactState", + }, + { + stage: "ctid", + table: "FlowAnalyticsSession", + }, + { + stage: "partitioned", + table: "ContactActiveHourly", + }, + { + stage: "partitioned", + table: "ContactActiveMonthly", + }, + { + stage: "ctid", + table: "MessageCleanup", + }, + { stage: "contactInboxPost", table: "ContactInboxPost" }, + { + stage: "leaderboard", + table: "LeaderboardScoreEvent", + }, + { stage: "hypertable", table: "Message" }, + { stage: "hypertable", table: "Attachment" }, + { stage: "retainedBilling", table: "WorkspaceMac" }, + { + stage: "retainedBilling", + table: "WorkspaceBotMessageUsage", + }, + { + stage: "retainedBilling", + table: "WorkspaceDeletionRecord", + }, +] as const + +export type HeavyWorkspaceTable = (typeof HEAVY_WORKSPACE_TABLES)[number] +export type PartitionedWorkspaceTable = + (typeof PARTITIONED_WORKSPACE_TABLES)[number] +export type WorkspaceAnalyticsHypertable = + (typeof WORKSPACE_ANALYTICS_HYPERTABLES)[number] +export type NoFkWorkspaceTable = + (typeof NO_FK_WORKSPACE_TABLES)[number]["table"] +export type WorkspacePurgeTable = + | HeavyWorkspaceTable + | NoFkWorkspaceTable + | PartitionedWorkspaceTable["table"] + | WorkspaceAnalyticsHypertable diff --git a/packages/database/src/schema/ai-agent.ts b/packages/database/src/schema/ai-agent.ts index 8aa5499097..0c0dd72fa8 100644 --- a/packages/database/src/schema/ai-agent.ts +++ b/packages/database/src/schema/ai-agent.ts @@ -2,6 +2,7 @@ import { sql } from "drizzle-orm" import { boolean, doublePrecision, + index, integer, jsonb, pgTable, @@ -10,24 +11,28 @@ import { import { bigintAsString, sharedColumns } from "../partials/shared" import { workspaceModel } from "./workspace" -export const aiAgentModel = pgTable("AIAgent", { - ...sharedColumns, - workspaceId: bigintAsString() - .notNull() - .references(() => workspaceModel.id, { - onDelete: "cascade", - onUpdate: "cascade", - }), - name: text().notNull(), - prompt: text(), - actionPrompt: text(), - actionRules: jsonb().array().notNull().default(sql`ARRAY[]::jsonb[]`), - messages: jsonb().array().notNull().default(sql`[]`), - isDefault: boolean().default(false).notNull(), - isRichResponse: boolean().default(false).notNull(), - tools: text().array().notNull().default(sql`[]`), - webSearchAuthorizedDomains: text().array().notNull().default(sql`[]`), - models: jsonb().array().notNull().default(sql`[]`), - temperature: doublePrecision().notNull(), - maxOutputTokens: integer().notNull(), -}) +export const aiAgentModel = pgTable( + "AIAgent", + { + ...sharedColumns, + workspaceId: bigintAsString() + .notNull() + .references(() => workspaceModel.id, { + onDelete: "cascade", + onUpdate: "cascade", + }), + name: text().notNull(), + prompt: text(), + actionPrompt: text(), + actionRules: jsonb().array().notNull().default(sql`ARRAY[]::jsonb[]`), + messages: jsonb().array().notNull().default(sql`[]`), + isDefault: boolean().default(false).notNull(), + isRichResponse: boolean().default(false).notNull(), + tools: text().array().notNull().default(sql`[]`), + webSearchAuthorizedDomains: text().array().notNull().default(sql`[]`), + models: jsonb().array().notNull().default(sql`[]`), + temperature: doublePrecision().notNull(), + maxOutputTokens: integer().notNull(), + }, + (table) => [index("AIAgent_workspaceId_idx").on(table.workspaceId)], +) diff --git a/packages/database/src/schema/ai-conversation-embedding.ts b/packages/database/src/schema/ai-conversation-embedding.ts index 7c5b880b6e..279f1250ed 100644 --- a/packages/database/src/schema/ai-conversation-embedding.ts +++ b/packages/database/src/schema/ai-conversation-embedding.ts @@ -64,5 +64,12 @@ export const aiConversationEmbeddingModel = pgTable( "btree", table.conversationId.asc().nullsLast(), ), + index("AIConversationEmbedding_lookup_idx").using( + "btree", + table.workspaceId.asc().nullsLast(), + table.conversationId.asc().nullsLast(), + table.sourceId.asc().nullsLast(), + table.status.asc().nullsLast(), + ), ], ) diff --git a/packages/database/src/schema/ai-embedding.ts b/packages/database/src/schema/ai-embedding.ts index e3f08f77c7..ca13ec80e3 100644 --- a/packages/database/src/schema/ai-embedding.ts +++ b/packages/database/src/schema/ai-embedding.ts @@ -34,5 +34,9 @@ export const aiEmbeddingModel = pgTable( "btree", table.workspaceId.asc().nullsLast(), ), + index("AIEmbedding_aiFileId_idx").using( + "btree", + table.aiFileId.asc().nullsLast(), + ), ], ) diff --git a/packages/database/src/schema/ai-file.ts b/packages/database/src/schema/ai-file.ts index 8eef6606a7..6630f721aa 100644 --- a/packages/database/src/schema/ai-file.ts +++ b/packages/database/src/schema/ai-file.ts @@ -1,17 +1,21 @@ -import { integer, pgTable, text } from "drizzle-orm/pg-core" +import { index, integer, pgTable, text } from "drizzle-orm/pg-core" import { bigintAsString, sharedColumns } from "../partials/shared" import { workspaceModel } from "./workspace" -export const aiFileModel = pgTable("AIFile", { - ...sharedColumns, - name: text().notNull(), - path: text().notNull(), - size: integer().notNull(), - mimeType: text().notNull(), - workspaceId: bigintAsString() - .notNull() - .references(() => workspaceModel.id, { - onDelete: "cascade", - onUpdate: "cascade", - }), -}) +export const aiFileModel = pgTable( + "AIFile", + { + ...sharedColumns, + name: text().notNull(), + path: text().notNull(), + size: integer().notNull(), + mimeType: text().notNull(), + workspaceId: bigintAsString() + .notNull() + .references(() => workspaceModel.id, { + onDelete: "cascade", + onUpdate: "cascade", + }), + }, + (table) => [index("AIFile_workspaceId_idx").on(table.workspaceId)], +) diff --git a/packages/database/src/schema/analytics-email-topic.ts b/packages/database/src/schema/analytics-email-topic.ts index 057959061a..96948d99b6 100644 --- a/packages/database/src/schema/analytics-email-topic.ts +++ b/packages/database/src/schema/analytics-email-topic.ts @@ -1,3 +1,4 @@ +import { sql } from "drizzle-orm" import { index, integer, @@ -73,5 +74,14 @@ export const analyticsEmailTopicModel = pgTable( table.workspaceId.asc().nullsLast(), table.topicId.asc().nullsLast(), ), + index("AnalyticsEmailTopic_contactId_idx") + .on(table.contactId) + .where(sql`${table.contactId} IS NOT NULL`), + index("AnalyticsEmailTopic_conversationId_idx") + .on(table.conversationId) + .where(sql`${table.conversationId} IS NOT NULL`), + index("AnalyticsEmailTopic_contactInboxId_idx") + .on(table.contactInboxId) + .where(sql`${table.contactInboxId} IS NOT NULL`), ], ) diff --git a/packages/database/src/schema/comment-automation-reply.ts b/packages/database/src/schema/comment-automation-reply.ts index dbb5d6d4ec..a62d4e5a2f 100644 --- a/packages/database/src/schema/comment-automation-reply.ts +++ b/packages/database/src/schema/comment-automation-reply.ts @@ -26,5 +26,6 @@ export const commentAutomationReplyModel = pgTable( t.postId, ), index("CommentAutomationReply_contactId_idx").on(t.contactId), + index("CommentAutomationReply_workspaceId_idx").on(t.workspaceId), ], ) diff --git a/packages/database/src/schema/contact-on-broadcast.ts b/packages/database/src/schema/contact-on-broadcast.ts index 10f5807314..df07e72d6b 100644 --- a/packages/database/src/schema/contact-on-broadcast.ts +++ b/packages/database/src/schema/contact-on-broadcast.ts @@ -57,6 +57,9 @@ export const contactsOnBroadcastsModel = pgTable( name: "ContactsOnBroadcast_pkey", }), index("idx_contact_on_broadcast_contact_id").on(table.contactId), + // Covers the `Conversation -> ContactOnBroadcast` ON DELETE CASCADE check. + // Built per partition + ATTACH (64 HASH partitions). + index("ContactOnBroadcast_conversationId_idx").on(table.conversationId), // Covers the `ContactInbox -> ContactOnBroadcast` ON DELETE CASCADE check. // Without it every ContactInbox delete (workspace purge, contact delete) // seq-scans all 64 partitions. Built per partition + ATTACH, see diff --git a/packages/database/src/schema/contact-to-tag.ts b/packages/database/src/schema/contact-to-tag.ts index 33078b3a4a..52edd010a8 100644 --- a/packages/database/src/schema/contact-to-tag.ts +++ b/packages/database/src/schema/contact-to-tag.ts @@ -1,4 +1,4 @@ -import { pgTable, primaryKey } from "drizzle-orm/pg-core" +import { index, pgTable, primaryKey } from "drizzle-orm/pg-core" import { bigintAsString } from "../partials/shared" import { contactModel } from "./contact" import { tagModel } from "./tag" @@ -23,5 +23,6 @@ export const contactsToTagsModel = pgTable( primaryKey({ columns: [table.contactId, table.tagId], }), + index("ContactToTag_tagId_idx").on(table.tagId), ], ) diff --git a/packages/database/src/schema/facebook-lead-ads-lead.ts b/packages/database/src/schema/facebook-lead-ads-lead.ts index 409e303297..93343350da 100644 --- a/packages/database/src/schema/facebook-lead-ads-lead.ts +++ b/packages/database/src/schema/facebook-lead-ads-lead.ts @@ -1,3 +1,4 @@ +import { sql } from "drizzle-orm" import { index, pgTable, text, uniqueIndex } from "drizzle-orm/pg-core" import { bigintAsString, sharedColumns } from "../partials/shared" import { contactModel } from "./contact" @@ -28,5 +29,8 @@ export const facebookLeadAdsLeadModel = pgTable( table.leadgenId.asc().nullsLast(), ), index("FacebookLeadAdsLead_leadgenId_idx").on(table.leadgenId), + index("FacebookLeadAdsLead_contactId_idx") + .on(table.contactId) + .where(sql`${table.contactId} IS NOT NULL`), ], ) diff --git a/packages/database/src/schema/flow-run.ts b/packages/database/src/schema/flow-run.ts index 9ebd5712f1..79a13fe2c3 100644 --- a/packages/database/src/schema/flow-run.ts +++ b/packages/database/src/schema/flow-run.ts @@ -37,5 +37,14 @@ export const flowRunModel = pgTable( "btree", table.conversationId.asc().nullsLast(), ), + index("FlowRun_workspaceId_idx").using( + "btree", + table.workspaceId.asc().nullsLast(), + ), + index("FlowRun_flowId_idx").using("btree", table.flowId.asc().nullsLast()), + index("FlowRun_flowVersionId_idx").using( + "btree", + table.flowVersionId.asc().nullsLast(), + ), ], ) diff --git a/packages/database/src/schema/flow-version.ts b/packages/database/src/schema/flow-version.ts index 56156f11e9..d3acf2c247 100644 --- a/packages/database/src/schema/flow-version.ts +++ b/packages/database/src/schema/flow-version.ts @@ -1,31 +1,38 @@ -import { boolean, jsonb, pgTable } from "drizzle-orm/pg-core" +import { boolean, index, jsonb, pgTable } from "drizzle-orm/pg-core" import { bigintAsString, sharedColumns } from "../partials/shared" import { flowModel } from "./flow" import { workspaceModel } from "./workspace" -export const flowVersionModel = pgTable("FlowVersion", { - ...sharedColumns, - workspaceId: bigintAsString() - .notNull() - .references(() => workspaceModel.id, { - onDelete: "cascade", - onUpdate: "cascade", - }), - flowId: bigintAsString() - .notNull() - .references(() => flowModel.id, { - onDelete: "cascade", - onUpdate: "cascade", - }), - nodes: jsonb() - .$type<{ id: string; [x: string]: unknown }>() - .array() - .notNull(), - edges: jsonb() - .$type<{ id: string; [x: string]: unknown }>() - .array() - .notNull(), - isDraft: boolean().notNull(), - isLatest: boolean().default(false).notNull(), - startNodeId: bigintAsString().notNull(), -}) +export const flowVersionModel = pgTable( + "FlowVersion", + { + ...sharedColumns, + workspaceId: bigintAsString() + .notNull() + .references(() => workspaceModel.id, { + onDelete: "cascade", + onUpdate: "cascade", + }), + flowId: bigintAsString() + .notNull() + .references(() => flowModel.id, { + onDelete: "cascade", + onUpdate: "cascade", + }), + nodes: jsonb() + .$type<{ id: string; [x: string]: unknown }>() + .array() + .notNull(), + edges: jsonb() + .$type<{ id: string; [x: string]: unknown }>() + .array() + .notNull(), + isDraft: boolean().notNull(), + isLatest: boolean().default(false).notNull(), + startNodeId: bigintAsString().notNull(), + }, + (table) => [ + index("FlowVersion_workspaceId_idx").on(table.workspaceId), + index("FlowVersion_flowId_idx").on(table.flowId), + ], +) diff --git a/packages/database/src/schema/flow.ts b/packages/database/src/schema/flow.ts index 9199c5e1f4..9a962d76ed 100644 --- a/packages/database/src/schema/flow.ts +++ b/packages/database/src/schema/flow.ts @@ -1,23 +1,27 @@ -import { boolean, pgTable, text } from "drizzle-orm/pg-core" +import { boolean, index, pgTable, text } from "drizzle-orm/pg-core" import { bigintAsString, sharedColumns } from "../partials/shared" import { folderModel } from "./folder" import { workspaceModel } from "./workspace" -export const flowModel = pgTable("Flow", { - ...sharedColumns, - name: text().notNull(), - active: boolean().default(true).notNull(), - enableInInbox: boolean().default(true).notNull(), - currentVersionId: bigintAsString(), - draftVersionId: bigintAsString(), - workspaceId: bigintAsString() - .notNull() - .references(() => workspaceModel.id, { - onDelete: "cascade", +export const flowModel = pgTable( + "Flow", + { + ...sharedColumns, + name: text().notNull(), + active: boolean().default(true).notNull(), + enableInInbox: boolean().default(true).notNull(), + currentVersionId: bigintAsString(), + draftVersionId: bigintAsString(), + workspaceId: bigintAsString() + .notNull() + .references(() => workspaceModel.id, { + onDelete: "cascade", + onUpdate: "cascade", + }), + folderId: bigintAsString().references(() => folderModel.id, { + onDelete: "set null", onUpdate: "cascade", }), - folderId: bigintAsString().references(() => folderModel.id, { - onDelete: "set null", - onUpdate: "cascade", - }), -}) + }, + (table) => [index("Flow_workspaceId_idx").on(table.workspaceId)], +) diff --git a/packages/database/src/schema/inbox-team.ts b/packages/database/src/schema/inbox-team.ts index 0460174063..e5a4344987 100644 --- a/packages/database/src/schema/inbox-team.ts +++ b/packages/database/src/schema/inbox-team.ts @@ -1,14 +1,18 @@ -import { pgTable, text } from "drizzle-orm/pg-core" +import { index, pgTable, text } from "drizzle-orm/pg-core" import { bigintAsString, sharedColumns } from "../partials/shared" import { workspaceModel } from "./workspace" -export const inboxTeamModel = pgTable("InboxTeam", { - ...sharedColumns, - workspaceId: bigintAsString() - .notNull() - .references(() => workspaceModel.id, { - onDelete: "cascade", - onUpdate: "cascade", - }), - name: text().notNull(), -}) +export const inboxTeamModel = pgTable( + "InboxTeam", + { + ...sharedColumns, + workspaceId: bigintAsString() + .notNull() + .references(() => workspaceModel.id, { + onDelete: "cascade", + onUpdate: "cascade", + }), + name: text().notNull(), + }, + (table) => [index("InboxTeam_workspaceId_idx").on(table.workspaceId)], +) diff --git a/packages/database/src/schema/index.ts b/packages/database/src/schema/index.ts index acf43d0392..79bc1d9edd 100644 --- a/packages/database/src/schema/index.ts +++ b/packages/database/src/schema/index.ts @@ -202,5 +202,7 @@ export * from "./working-hours-interval" export * from "./working-hours-member" export * from "./workspace" export * from "./workspace-api-token" +export * from "./workspace-bot-message-usage" +export * from "./workspace-deletion-record" export * from "./workspace-mac" export * from "./workspace-member" diff --git a/packages/database/src/schema/leaderboard-audit-log.ts b/packages/database/src/schema/leaderboard-audit-log.ts index a2540b865d..9e69acc25f 100644 --- a/packages/database/src/schema/leaderboard-audit-log.ts +++ b/packages/database/src/schema/leaderboard-audit-log.ts @@ -68,5 +68,9 @@ export const leaderboardAuditLogModel = pgTable( table.leaderboardId.asc().nullsLast(), table.createdAt.desc().nullsFirst(), ), + index("LeaderboardAuditLog_workspaceId_idx").using( + "btree", + table.workspaceId.asc().nullsLast(), + ), ], ) diff --git a/packages/database/src/schema/leaderboard-participant.ts b/packages/database/src/schema/leaderboard-participant.ts index 531224518f..bce0a5f04c 100644 --- a/packages/database/src/schema/leaderboard-participant.ts +++ b/packages/database/src/schema/leaderboard-participant.ts @@ -87,5 +87,12 @@ export const leaderboardParticipantModel = pgTable( "btree", table.contactId.asc().nullsLast(), ), + index("LeaderboardParticipant_workspaceId_idx").using( + "btree", + table.workspaceId.asc().nullsLast(), + ), + index("LeaderboardParticipant_referrerContactId_idx") + .using("btree", table.referrerContactId.asc().nullsLast()) + .where(sql`${table.referrerContactId} IS NOT NULL`), ], ) diff --git a/packages/database/src/schema/mini-app-upload.ts b/packages/database/src/schema/mini-app-upload.ts index da1c1582b8..09466bac20 100644 --- a/packages/database/src/schema/mini-app-upload.ts +++ b/packages/database/src/schema/mini-app-upload.ts @@ -1,3 +1,4 @@ +import { sql } from "drizzle-orm" import { index, integer, @@ -72,5 +73,8 @@ export const miniAppUploadModel = pgTable( "btree", table.submissionId.asc().nullsLast(), ), + index("MiniAppUpload_contactId_idx") + .on(table.contactId) + .where(sql`${table.contactId} IS NOT NULL`), ], ) diff --git a/packages/database/src/schema/minigame-contact.ts b/packages/database/src/schema/minigame-contact.ts index 509f9b69a5..d60aa921f6 100644 --- a/packages/database/src/schema/minigame-contact.ts +++ b/packages/database/src/schema/minigame-contact.ts @@ -1,3 +1,4 @@ +import { sql } from "drizzle-orm" import { index, integer, @@ -93,5 +94,11 @@ export const minigameContactModel = pgTable( table.minigameId.asc().nullsLast(), table.contactId.asc().nullsLast(), ), + index("MinigameContact_referrerContactId_idx") + .on(table.referrerContactId) + .where(sql`${table.referrerContactId} IS NOT NULL`), + index("MinigameContact_contactInboxId_idx") + .on(table.contactInboxId) + .where(sql`${table.contactInboxId} IS NOT NULL`), ], ) diff --git a/packages/database/src/schema/questionnaire.ts b/packages/database/src/schema/questionnaire.ts index cec0f9029a..5cb2faa5df 100644 --- a/packages/database/src/schema/questionnaire.ts +++ b/packages/database/src/schema/questionnaire.ts @@ -197,6 +197,13 @@ export const questionnaireSubmissionModel = pgTable( table.questionnaireId.asc().nullsLast(), table.contactId.asc().nullsLast(), ), + index("QuestionnaireSubmission_contactId_idx").on(table.contactId), + index("QuestionnaireSubmission_conversationId_idx") + .on(table.conversationId) + .where(sql`${table.conversationId} IS NOT NULL`), + index("QuestionnaireSubmission_currentQuestionId_idx") + .on(table.currentQuestionId) + .where(sql`${table.currentQuestionId} IS NOT NULL`), uniqueIndex("QuestionnaireSubmission_workspaceId_contactId_active_key") .on(table.workspaceId, table.contactId) .where(sql`${table.status} = 'inProgress'`), diff --git a/packages/database/src/schema/saved-reply-image.ts b/packages/database/src/schema/saved-reply-image.ts index 8ac26887c7..ced9d72b64 100644 --- a/packages/database/src/schema/saved-reply-image.ts +++ b/packages/database/src/schema/saved-reply-image.ts @@ -43,6 +43,10 @@ export const savedReplyImageModel = pgTable( "btree", table.mediaLibraryFileId.asc().nullsLast(), ), + index("SavedReplyImage_workspaceId_idx").using( + "btree", + table.workspaceId.asc().nullsLast(), + ), uniqueIndex("SavedReplyImage_savedReplyId_mediaLibraryFileId_key").on( table.savedReplyId, table.mediaLibraryFileId, diff --git a/packages/database/src/schema/saved-reply.ts b/packages/database/src/schema/saved-reply.ts index 3926d65b30..c260f07896 100644 --- a/packages/database/src/schema/saved-reply.ts +++ b/packages/database/src/schema/saved-reply.ts @@ -1,15 +1,19 @@ -import { pgTable, text } from "drizzle-orm/pg-core" +import { index, pgTable, text } from "drizzle-orm/pg-core" import { bigintAsString, sharedColumns } from "../partials/shared" import { workspaceModel } from "./workspace" -export const savedReplyModel = pgTable("SavedReply", { - ...sharedColumns, - shortcut: text().notNull(), - text: text().notNull(), - workspaceId: bigintAsString() - .notNull() - .references(() => workspaceModel.id, { - onDelete: "cascade", - onUpdate: "cascade", - }), -}) +export const savedReplyModel = pgTable( + "SavedReply", + { + ...sharedColumns, + shortcut: text().notNull(), + text: text().notNull(), + workspaceId: bigintAsString() + .notNull() + .references(() => workspaceModel.id, { + onDelete: "cascade", + onUpdate: "cascade", + }), + }, + (table) => [index("SavedReply_workspaceId_idx").on(table.workspaceId)], +) diff --git a/packages/database/src/schema/sequence-dispatch.ts b/packages/database/src/schema/sequence-dispatch.ts index 5b96652748..62c7e909d1 100644 --- a/packages/database/src/schema/sequence-dispatch.ts +++ b/packages/database/src/schema/sequence-dispatch.ts @@ -137,5 +137,10 @@ export const sequenceDispatchModel = pgTable( // Covers the `ContactInbox -> SequenceDispatch` ON DELETE CASCADE check; // built per partition + ATTACH (64 HASH partitions). index("SequenceDispatch_contactInboxId_idx").on(table.contactInboxId), + // Covers the `Sequence -> SequenceDispatch` and + // `SequenceStep -> SequenceDispatch` ON DELETE CASCADE checks; both are + // built per partition + ATTACH (64 HASH partitions). + index("SequenceDispatch_sequenceId_idx").on(table.sequenceId), + index("SequenceDispatch_stepId_idx").on(table.stepId), ], ) diff --git a/packages/database/src/schema/workspace-bot-message-usage.ts b/packages/database/src/schema/workspace-bot-message-usage.ts new file mode 100644 index 0000000000..5805d3680b --- /dev/null +++ b/packages/database/src/schema/workspace-bot-message-usage.ts @@ -0,0 +1,49 @@ +import { + index, + integer, + type PgTimestampConfig, + pgTable, + timestamp, + unique, +} from "drizzle-orm/pg-core" +import { bigintAsString, sharedColumns } from "../partials/shared" +import { userModel } from "./auth-user" + +const periodTimestampConfig: PgTimestampConfig<"date"> = { + mode: "date", + precision: 6, + withTimezone: true, +} + +/** Retained per-workspace billing evidence; it outlives Workspace. */ +export const workspaceBotMessageUsageModel = pgTable( + "WorkspaceBotMessageUsage", + { + ...sharedColumns, + workspaceId: bigintAsString().notNull(), + ownerId: bigintAsString() + .notNull() + .references(() => userModel.id, { + onDelete: "cascade", + onUpdate: "cascade", + }), + tenantId: bigintAsString().notNull(), + periodStart: timestamp(periodTimestampConfig).notNull(), + periodEnd: timestamp(periodTimestampConfig).notNull(), + count: integer().notNull().default(0), + }, + (table) => [ + index("WorkspaceBotMessageUsage_ownerId_periodStart_idx").on( + table.ownerId, + table.periodStart, + ), + index("WorkspaceBotMessageUsage_tenantId_periodStart_idx").on( + table.tenantId, + table.periodStart, + ), + unique("WorkspaceBotMessageUsage_workspaceId_periodStart_key").on( + table.workspaceId, + table.periodStart, + ), + ], +) diff --git a/packages/database/src/schema/workspace-deletion-record.ts b/packages/database/src/schema/workspace-deletion-record.ts new file mode 100644 index 0000000000..74e1af804a --- /dev/null +++ b/packages/database/src/schema/workspace-deletion-record.ts @@ -0,0 +1,123 @@ +import { + index, + jsonb, + pgTable, + text, + timestamp, + unique, +} from "drizzle-orm/pg-core" +import { z } from "zod" +import { + bigintAsString, + sharedColumns, + timestampConfig, +} from "../partials/shared" + +const timestampSchema = z.iso.datetime() + +const periodUsageSchema = z.object({ + count: z.number().int(), + periodEnd: timestampSchema, + periodStart: timestampSchema, +}) +const quotaSnapshotSchema = z.object({ + botMessagesUsed: z.number().int(), + macUsed: z.number().int(), + monthlyBotMessagesUsed: z.number().int(), + periodEnd: timestampSchema.nullable(), + periodStart: timestampSchema.nullable(), + planName: z.string().nullable(), + planStatus: z.string().nullable(), +}) + +export const workspaceDeletionRecordUsageSnapshotSchema = z.object({ + botMessages: z.array(periodUsageSchema), + channels: z.number().int().nonnegative(), + contacts: z.number().int().nonnegative(), + mac: z.array(periodUsageSchema), + ownerQuota: quotaSnapshotSchema.nullable(), + teamMembers: z.number().int().nonnegative(), +}) +export type WorkspaceDeletionRecordUsageSnapshot = z.infer< + typeof workspaceDeletionRecordUsageSnapshotSchema +> + +export const workspaceDeletionRecordDetailsSchema = z.object({ + channels: z.array( + z.object({ + channel: z.string(), + id: z.string(), + name: z.string(), + status: z.string(), + }), + ), + members: z.array( + z.object({ + email: z.string().nullable(), + name: z.string().nullable(), + role: z.string(), + userId: z.string(), + }), + ), + owner: z.object({ + email: z.string().nullable(), + id: z.string(), + name: z.string().nullable(), + tenantId: z.string().nullable(), + }), + plan: z + .object({ + periodEnd: timestampSchema.nullable(), + periodStart: timestampSchema.nullable(), + planName: z.string().nullable(), + planStatus: z.string().nullable(), + }) + .nullable(), + requestedBy: z + .object({ + email: z.string().nullable(), + id: z.string().nullable(), + name: z.string().nullable(), + via: z.literal("ui"), + }) + .nullable(), + workspace: z.object({ + createdAt: timestampSchema, + id: z.string(), + language: z.string(), + logo: z.string().nullable(), + name: z.string(), + timezone: z.string(), + }), +}) +export type WorkspaceDeletionRecordDetails = z.infer< + typeof workspaceDeletionRecordDetailsSchema +> +/** + * Immutable purge-time evidence. Deliberately has no foreign keys: it must + * survive deletion of both the workspace and any referenced user. + */ +export const workspaceDeletionRecordModel = pgTable( + "WorkspaceDeletionRecord", + { + ...sharedColumns, + workspaceId: bigintAsString().notNull(), + workspaceName: text().notNull(), + ownerId: bigintAsString().notNull(), + ownerEmail: text(), + tenantId: bigintAsString().notNull(), + deletionRequestedById: bigintAsString(), + deletionRequestedByEmail: text(), + deletionRequestedAt: timestamp(timestampConfig), + scheduledDeletionAt: timestamp(timestampConfig), + purgedAt: timestamp(timestampConfig), + usageSnapshot: jsonb() + .$type() + .notNull(), + details: jsonb().$type().notNull(), + }, + (table) => [ + unique("WorkspaceDeletionRecord_workspaceId_key").on(table.workspaceId), + index("WorkspaceDeletionRecord_ownerEmail_idx").on(table.ownerEmail), + ], +) diff --git a/packages/database/src/schema/workspace-mac.ts b/packages/database/src/schema/workspace-mac.ts index 8a07d11847..898a08aecc 100644 --- a/packages/database/src/schema/workspace-mac.ts +++ b/packages/database/src/schema/workspace-mac.ts @@ -1,4 +1,5 @@ import { + index, integer, type PgTimestampConfig, pgTable, @@ -6,7 +7,7 @@ import { unique, } from "drizzle-orm/pg-core" import { bigintAsString, sharedColumns } from "../partials/shared" -import { workspaceModel } from "./workspace" +import { userModel } from "./auth-user" const periodTimestampConfig: PgTimestampConfig<"date"> = { mode: "date", @@ -18,17 +19,26 @@ export const workspaceMacModel = pgTable( "WorkspaceMac", { ...sharedColumns, - workspaceId: bigintAsString() - .notNull() - .references(() => workspaceModel.id, { - onDelete: "cascade", - onUpdate: "cascade", - }), + // Retained billing rollups stay after their workspace is purged. + workspaceId: bigintAsString().notNull(), + ownerId: bigintAsString().references(() => userModel.id, { + onDelete: "cascade", + onUpdate: "cascade", + }), + tenantId: bigintAsString(), periodStart: timestamp(periodTimestampConfig).notNull(), periodEnd: timestamp(periodTimestampConfig).notNull(), macCount: integer().notNull().default(0), }, (table) => [ + index("WorkspaceMac_ownerId_periodStart_idx").on( + table.ownerId, + table.periodStart, + ), + index("WorkspaceMac_tenantId_periodStart_idx").on( + table.tenantId, + table.periodStart, + ), unique("WorkspaceMac_workspaceId_periodStart_periodEnd_unique").on( table.workspaceId, table.periodStart, diff --git a/packages/database/src/schema/workspace.ts b/packages/database/src/schema/workspace.ts index 69b564a2fc..4a8b72cc61 100644 --- a/packages/database/src/schema/workspace.ts +++ b/packages/database/src/schema/workspace.ts @@ -51,6 +51,8 @@ export const workspaceModel = pgTable( endTime: text(), logo: text(), scheduledDeletionAt: timestamp(timestampConfig), + deletionRequestedById: bigintAsString(), + deletionRequestedAt: timestamp(timestampConfig), purgeStartedAt: timestamp(timestampConfig), // Owner opt-in for platform support access. Non-null and in the future // means the owner has consented to the super admin opening this diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts index 4f302b040b..85ff89c3ed 100644 --- a/packages/database/src/types.ts +++ b/packages/database/src/types.ts @@ -331,6 +331,10 @@ export type QuestionnaireSubmissionModel = export type QuestionnaireAnswerModel = typeof schema.questionnaireAnswerModel.$inferSelect export type WorkspaceMacModel = typeof schema.workspaceMacModel.$inferSelect +export type WorkspaceBotMessageUsageModel = + typeof schema.workspaceBotMessageUsageModel.$inferSelect +export type WorkspaceDeletionRecordModel = + typeof schema.workspaceDeletionRecordModel.$inferSelect export type ContactActiveHourlyModel = typeof schema.contactActiveHourlyModel.$inferSelect export type AutomationThrottleModel = diff --git a/packages/sequence-scheduler/__tests__/dispatch-manager.test.ts b/packages/sequence-scheduler/__tests__/dispatch-manager.test.ts index 0ae479c362..6b4219f4ea 100644 --- a/packages/sequence-scheduler/__tests__/dispatch-manager.test.ts +++ b/packages/sequence-scheduler/__tests__/dispatch-manager.test.ts @@ -6,9 +6,11 @@ const findManyMock = vi.fn() const updateWhereMock = vi.fn() const removeFromScheduleMock = vi.fn() const useExistingMock = vi.fn() +const executeMock = vi.fn() vi.mock("@chatbotx.io/database/client", () => ({ db: { + execute: (...args: unknown[]) => executeMock(...args), insert: () => ({ values: () => ({ returning: returningInsertMock }), }), @@ -28,6 +30,10 @@ vi.mock("@chatbotx.io/database/client", () => ({ and: (...a: unknown[]) => ({ __and: a }), eq: (c: unknown, v: unknown) => ({ __eq: [c, v] }), inArray: (c: unknown, v: unknown) => ({ __inArray: [c, v] }), + sql: (strings: TemplateStringsArray, ...values: unknown[]) => ({ + strings, + values, + }), })) vi.mock("@chatbotx.io/database/schema", () => ({ @@ -344,33 +350,4 @@ describe("cancelPendingDispatches", () => { expect(customFindManyMock).toHaveBeenCalledTimes(1) expect(findManyMock).not.toHaveBeenCalled() }) - - test("cancels all pending dispatches for a workspace without enrollmentId", async () => { - const { cancelPendingDispatchesForWorkspace } = await import( - "../src/dispatch-cancel" - ) - findManyMock.mockResolvedValue([ - { - id: "d-1", - bucket: 9, - sequenceId: "seq-1", - contactId: "c-1", - stepId: "s-1", - }, - ]) - - const result = await cancelPendingDispatchesForWorkspace({ - workspaceId: "ws-2", - }) - - expect(result).toEqual([{ id: "d-1", bucket: 9 }]) - expect(findManyMock).toHaveBeenCalledWith( - expect.objectContaining({ - where: expect.objectContaining({ - workspaceId: "ws-2", - status: "pending", - }), - }), - ) - }) }) diff --git a/packages/sequence-scheduler/src/dispatch-cancel.ts b/packages/sequence-scheduler/src/dispatch-cancel.ts index 3c1631aeb4..9e4cc136cc 100644 --- a/packages/sequence-scheduler/src/dispatch-cancel.ts +++ b/packages/sequence-scheduler/src/dispatch-cancel.ts @@ -6,6 +6,7 @@ import { inArray, type Transaction, } from "@chatbotx.io/database/client" +import { sequenceDispatchRepository } from "@chatbotx.io/database/repositories/sequence-dispatch" import { sequenceDispatchModel } from "@chatbotx.io/database/schema" import { sequenceConnections } from "@chatbotx.io/redis" import { SchedulerClient } from "@chatbotx.io/scheduler" @@ -18,7 +19,7 @@ import { SchedulerClient } from "@chatbotx.io/scheduler" */ type DrizzleClient = typeof db | Transaction -type ScheduledDispatch = { id: string; bucket: number } +export type ScheduledDispatch = { id: string; bucket: number } type PendingDispatch = { bucket: number contactId: string @@ -46,6 +47,7 @@ const pendingDispatchColumns = { contactId: true, stepId: true, } as const +export const WORKSPACE_DISPATCH_CANCEL_BATCH_SIZE = 500 export interface CancelPendingDispatchesParams { client?: DatabaseClient | Transaction @@ -111,19 +113,17 @@ export async function cancelPendingDispatches( }) } -export async function cancelPendingDispatchesForWorkspace(params: { - client?: DatabaseClient | Transaction - removeFromSchedule?: boolean +export async function cancelPendingDispatchBatch(params: { + client?: DatabaseClient workspaceId: string }): Promise { - return await cancelPendingDispatchesByWhere({ - client: params.client, - removeFromSchedule: params.removeFromSchedule, - where: { - status: "pending", + return await sequenceDispatchRepository.cancelPendingBatchForWorkspace( + { + limit: WORKSPACE_DISPATCH_CANCEL_BATCH_SIZE, workspaceId: params.workspaceId, }, - }) + params.client, + ) } export async function removeDispatchesFromSchedule(