From 33c0fdd4e6ac02b21e0178c37dbc3e9ad5024b58 Mon Sep 17 00:00:00 2001 From: leemour Date: Tue, 17 Nov 2026 22:30:52 +0100 Subject: [PATCH 1/2] =?UTF-8?q?feat(tracker):=20the=20tracker=20category?= =?UTF-8?q?=20=E2=80=94=20store=20version=2070,=20TrackerSource,=20syncTra?= =?UTF-8?q?cker,=20commands=20and=20contract=20kit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds src/tracker, exported as @wirecat/cli-core/tracker and /tracker/testing: - Store version 70 (reserved in #3092): tracker_items, one row per team, user, state, label, project, issue and comment of a tracker account, and the FTS5 word index tracker_item_words kept by triggers. store.tracker saves with a merge (a field a read leaves out keeps its value), lists issues by team, project, assignee, state, state type and label, finds by words, and joins users to people by exact e-mail when read. - TrackerSource: changes by cursor with reset, ids for deletions. - syncTracker: per-kind cursors saved after each page, a daily id pass that resumes, a run budget, and a cycle that skips the kinds a stopped run finished so a small budget still moves on. - addTrackerCommands: sync, issues list/show/search/task, and lists of projects, teams, users, states and labels; tracker text is marked untrusted. - issues task links an issue as the owner's task (source tracker:issue/), copying only its key. - trackerSourceContract with fault cases, fakeTrackerSource and exampleTrackerRows. Co-Authored-By: Claude Opus 5.5 --- biome.json | 6 +- changes/feat-tracker.md | 8 + docs/dev/ARCHITECTURE.md | 1 + docs/dev/TRACKER.md | 69 + docs/storage/schema.md | 39 +- .../migration.sql | 21 + .../snapshot.json | 24463 ++++++++++++++++ .../migration.sql | 17 + .../snapshot.json | 24463 ++++++++++++++++ package.json | 10 +- scripts/schema/spec.mjs | 8 + scripts/schema/tracker.mjs | 36 + .../messenger/store-maintenance-command.ts | 4 +- src/domain/tracker.ts | 132 + src/store/exports.ts | 9 + src/store/recover.ts | 2 + src/store/sqlite/account-purge.ts | 1 + src/store/sqlite/crm-files.ts | 4 +- src/store/sqlite/manifest.ts | 2 + src/store/sqlite/migrations.generated.ts | 16 + src/store/sqlite/schema.ts | 33 + src/store/sqlite/tracker.ts | 341 + src/store/store.ts | 7 + src/store/version-70.test.ts | 47 + src/testing/older-store.ts | 1 + src/tracker/cli/commands.test.ts | 86 + src/tracker/cli/index.ts | 389 + src/tracker/index.ts | 33 + src/tracker/source.ts | 63 + src/tracker/sync.ts | 295 + src/tracker/tasks.ts | 39 + src/tracker/testing/index.ts | 12 + src/tracker/testing/source-contract.ts | 268 + src/tracker/testing/source.ts | 171 + src/tracker/tracker.test.ts | 168 + 35 files changed, 51256 insertions(+), 8 deletions(-) create mode 100644 changes/feat-tracker.md create mode 100644 docs/dev/TRACKER.md create mode 100644 drizzle/20261117211410_version-70-tracker-items/migration.sql create mode 100644 drizzle/20261117211410_version-70-tracker-items/snapshot.json create mode 100644 drizzle/20261117211414_version-70-tracker-item-words/migration.sql create mode 100644 drizzle/20261117211414_version-70-tracker-item-words/snapshot.json create mode 100644 scripts/schema/tracker.mjs create mode 100644 src/domain/tracker.ts create mode 100644 src/store/sqlite/tracker.ts create mode 100644 src/store/version-70.test.ts create mode 100644 src/tracker/cli/commands.test.ts create mode 100644 src/tracker/cli/index.ts create mode 100644 src/tracker/index.ts create mode 100644 src/tracker/source.ts create mode 100644 src/tracker/sync.ts create mode 100644 src/tracker/tasks.ts create mode 100644 src/tracker/testing/index.ts create mode 100644 src/tracker/testing/source-contract.ts create mode 100644 src/tracker/testing/source.ts create mode 100644 src/tracker/tracker.test.ts diff --git a/biome.json b/biome.json index 5e614d908..d3c205091 100644 --- a/biome.json +++ b/biome.json @@ -771,7 +771,7 @@ "noExcessiveLinesPerFile": { "level": "error", "options": { - "maxLines": 1872 + "maxLines": 1880 } } } @@ -816,7 +816,7 @@ "noExcessiveLinesPerFile": { "level": "error", "options": { - "maxLines": 2947 + "maxLines": 2980 } } } @@ -831,7 +831,7 @@ "noExcessiveLinesPerFile": { "level": "error", "options": { - "maxLines": 486 + "maxLines": 493 } } } diff --git a/changes/feat-tracker.md b/changes/feat-tracker.md new file mode 100644 index 000000000..d744f11ac --- /dev/null +++ b/changes/feat-tracker.md @@ -0,0 +1,8 @@ +### Added + +- **Issue trackers get their own category: `@wirecat/cli-core/tracker`.** A tracker CLI writes one `TrackerSource` + and gets the copy in the shared store (store version 70: `tracker_items` and the word index `tracker_item_words`), + `syncTracker` (changes by cursor, deletions by a daily id pass, a run budget that resumes where it stopped), + `addTrackerCommands` (`sync`, `issues list|show|search|task`, and `projects`, `teams`, `users`, `states`, `labels` + lists), and `/tracker/testing` with `trackerSourceContract` and `fakeTrackerSource`. `issues task` makes an issue + the owner's task by a link, copying only its key. See [Trackers](../docs/dev/TRACKER.md). diff --git a/docs/dev/ARCHITECTURE.md b/docs/dev/ARCHITECTURE.md index 6a3753005..8385c44fe 100644 --- a/docs/dev/ARCHITECTURE.md +++ b/docs/dev/ARCHITECTURE.md @@ -85,6 +85,7 @@ alias, keyword and person lanes and returns cited evidence with a resume checkpo | `./constants` | `src/constants/` | the packaged constants (`constants`, `constantsSchema`), the app a sign-in uses (`googleApp`, `microsoftApp`, `oauthApp`) and `doctor`'s report of it (`oauthClientReport`) — see [Constants](CONSTANTS.md) | | `./mail`, `/mail/testing` | `src/mail/` | the mail source port, the sync engine over `store.mail` (resume points, rules, deletions, attachment text), sender scoring and the contract kit — see [Mail](MAIL.md) | | `./crm`, `/crm/cli`, `/crm/testing` | `src/crm/` | the CRM port, the sync engine, the guarded writes, the live `people`, `organizations` and `users` commands, the `files` commands, the adapter helpers and the contract kit — see [CRM](CRM.md) | +| `./tracker`, `/tracker/testing` | `src/tracker/` | issue trackers: the `TrackerSource` port, the sync engine over `store.tracker` (changes by cursor, deletions by an id pass), the issue → owner task link, the shared commands and the contract kit — see [Trackers](TRACKER.md) | | `./google` | `src/google/` | what every Google API client shares: `googleError` turns a refusal into a `CliError` by Google's reasons, and `googlePages` reads every `pageToken` page, refusing a repeated token | | `./sftp` | `src/sftp/` | a read-only SFTP client and an SSH tunnel that only forwards: `session.ts` holds the host-key pin, deadlines, retries and run events; `ssh2.ts` is the only file that loads `ssh2` (an optional peer, imported on first use) — see [SFTP](../sftp.md) | | `./sql` | `src/sql/` | a read-only SQL reader: `reader.ts` opens mysql2 or pg (optional peers, imported on first use) read-only, pages a host's table and maps driver errors — see [SQL](../sql.md) | diff --git a/docs/dev/TRACKER.md b/docs/dev/TRACKER.md new file mode 100644 index 000000000..b2da66d22 --- /dev/null +++ b/docs/dev/TRACKER.md @@ -0,0 +1,69 @@ +# Trackers + +`src/tracker/`, exported as `@wirecat/cli-core/tracker` and `/tracker/testing`. A tracker CLI (Linear first) writes its +sign-in and one adapter, a `TrackerSource`; the copy in the shared store, the sync, the commands and the contract kit +are shared, as for [CRMs](CRM.md) and [mail](MAIL.md). The tables are in the [schema](../storage/schema.md); this page +covers what runs over them. + +## The domain + +Seven kinds, in the order a sync reads them: `team`, `user`, `state`, `label`, `project`, `issue`, `comment` +(`TRACKER_KINDS`, `src/domain/tracker.ts`). Each record carries the tracker's `externalId`, its `createdAt`, +`updatedAt` and `archivedAt` in epoch milliseconds, and refers to other rows by their tracker ids: an issue's `state`, +`team`, `project`, `assignee`, `labels` and `parent`, a comment's `issue`. A state has one of six types +(`STATE_TYPES`): `triage`, `backlog`, `unstarted`, `started`, `completed`, `canceled`, so "open work" reads the same +whatever each team named its states. + +## The port + +| Member | What the adapter does | +|---|---| +| `traits.kinds` | the kinds this tracker has, in `TRACKER_KINDS` order | +| `changes(kind, cursor, page?, context?)` | what changed since `cursor`, a page at a time; `cursor: null` lists everything. A tracker without a change feed reads by its modified time less an overlap and gives that time back as the last page's `cursor`. A dead cursor answers `{ reset: true }` | +| `ids(kind, page?, context?)` | every id the tracker holds of the kind, archived ones too, a page at a time | +| `self?(context?)` | the sign-in's own user id | + +Archived rows are listed, with `archivedAt`, and the copy keeps them marked. A row deleted outright is found only by +`ids()`. A source that pages inside one call asks `context.spend()` before each further request, and names what the +sign-in could not read with `context.gap()`. + +## `syncTracker(source, store, account, options)` + +For each kind: the changes since the kind's cursor, page by page, each page saved with the cursor after it +(`tracker:` in the account's sync state). Then, once `passEvery` (a day) has passed since the last complete one, +an id pass that marks deleted each stored row the list lacks and that was not saved since the pass began. A pass that +stops keeps its ids and the page it reached. + +- **Budget.** The engine takes one request from `options.budget` before each call. A run that stops answers + `state: "partial"` and `stopped`; the kinds it finished are skipped by the next run until every kind has had its + round, so a budget smaller than the number of kinds still moves on. +- **Failures.** A kind that fails is named in its result's `error` and the others still sync. +- **`rescan`.** Lists everything again and every id, dropping a round in progress. + +A save merges: a field the read left out keeps its stored value, so a partial selection never erases. + +## `store.tracker` + +`save`, `removeUnlisted`, `get`, `issueByKey` (`ENG-12`, any case), `list` with issue filters (team, project, +assignee or none, state, state types through the state rows, label, archived), `find` over the word index +`tracker_item_words` (titles, descriptions, comment bodies), `count`, and `people`: the tracker users whose e-mail an +identity linked to a person has, joined when read. Nothing is written to the people graph. + +## An issue as the owner's task + +`trackerIssueTask(store, account, issue)` and `issues task ` make an issue the owner's task: `source` is +`tracker:issue/`, `sourceKind` is `tracker_issue`, and the title is the issue's key only. The task links +to the issue and copies none of its text. The same issue again answers the task it already has. + +## Commands + +`addTrackerCommands(program, { app, open })` mounts `sync`, `issues list|show|search|task`, and `list` for +`projects`, `teams`, `users` (each with its person), `states` and `labels`. Every text field from the tracker is named +in the row's `untrusted`. + +## The contract kit + +`trackerSourceContract(make)` checks an adapter: full lists in the domain's shape, every held row listed, a cursor +read again, `ids()` covering the full list, a dead cursor answering reset, a clock off by ten minutes either way, an +archived row still listed, a deleted row leaving `ids()`, a list cut after its first page, and a spent budget ending a +call that pages inside. `fakeTrackerSource` and `exampleTrackerRows` are an in-memory tracker for tests. diff --git a/docs/storage/schema.md b/docs/storage/schema.md index e4f8f7285..857aea111 100644 --- a/docs/storage/schema.md +++ b/docs/storage/schema.md @@ -5,7 +5,7 @@ Every table of the shared store (tg, max, memo, zm) as its migrations create it. `drizzle/` must agree with it. `pnpm schema:check` fails when they do not, and `src/store/sqlite/schema.test.ts` checks every table and column of a new store against this page. -137 tables, 26 full-text indexes. +138 tables, 27 full-text indexes. ## Conventions @@ -3006,6 +3006,43 @@ How up to date one built chat's conversations and one model's vectors are, as `s *Keys and indexes:* `PRIMARY KEY (chat_id, model)`, `INDEX (model)` +## Issue trackers + +What an issue tracker account holds, as last synced: teams, users, workflow states, labels, projects, issues and comments. A user joins a person only by exact e-mail, when read; nothing here writes to the people graph. + +### `tracker_items` + +One team, user, workflow state, label, project, issue or comment of an issue tracker account (Linear), as last synced. The columns are what lists, filters and search read; the rest of the record is `data`. + +| Column | Type | Constraints | References | Meaning | +|---|---|---|---|---| +| `id` | integer | PK | | | +| `account_id` | integer | not null | → `accounts.id` | the tracker account it was copied from | +| `kind` | text | not null | | team, user, state, label, project, issue or comment | +| `external_id` | text | not null | | its id in the tracker | +| `parent_id` | text | | | the tracker's id of what it hangs under: a comment's issue, an issue's, a state's or a label's team | +| `title` | text | not null | | an issue's title, a comment's first line, anything else's name | +| `title_folded` | text | not null | | the title in one letter case | +| `body` | text | | | an issue's or a project's description, a comment's text | +| `normalized_text` | text | not null | | title and body normalized for the word index | +| `data` | text | not null | | JSON: the record in the tracker domain's field names; a field the tracker did not send keeps its stored value | +| `source_created_at` | integer | | | when the tracker says it was made | +| `source_updated_at` | integer | | | when the tracker says it last changed | +| `archived_at` | integer | | | the tracker archived it; it still exists there | +| `deleted_at` | integer | | | the tracker no longer lists it; sync never hard-deletes | +| `synced_at` | integer | not null | | | + +*Keys and indexes:* `UNIQUE (account_id, kind, external_id)`, `INDEX (account_id, kind, parent_id)` + +### `tracker_item_words` + +Word index over a tracker item's title and text, rowid = `tracker_items.id`. + +```sql +CREATE VIRTUAL TABLE tracker_item_words USING fts5(normalized_text, content = '', contentless_delete = 1, tokenize = 'unicode61 remove_diacritics 2', prefix = '3'); +CREATE VIRTUAL TABLE tracker_item_words_vocab USING fts5vocab(tracker_item_words, 'col') +``` + ## Store Bookkeeping for the file itself. diff --git a/drizzle/20261117211410_version-70-tracker-items/migration.sql b/drizzle/20261117211410_version-70-tracker-items/migration.sql new file mode 100644 index 000000000..70f942be1 --- /dev/null +++ b/drizzle/20261117211410_version-70-tracker-items/migration.sql @@ -0,0 +1,21 @@ +CREATE TABLE `tracker_items` ( + `id` integer PRIMARY KEY, + `account_id` integer NOT NULL, + `kind` text NOT NULL, + `external_id` text NOT NULL, + `parent_id` text, + `title` text NOT NULL, + `title_folded` text NOT NULL, + `body` text, + `normalized_text` text NOT NULL, + `data` text NOT NULL, + `source_created_at` integer, + `source_updated_at` integer, + `archived_at` integer, + `deleted_at` integer, + `synced_at` integer NOT NULL, + CONSTRAINT `fk_tracker_items_account_id_accounts_id_fk` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`), + CONSTRAINT `tracker_items_account_id_kind_external_id_unique` UNIQUE(`account_id`,`kind`,`external_id`) +); +--> statement-breakpoint +CREATE INDEX `tracker_items_by_account_id_kind_parent_id` ON `tracker_items` (`account_id`,`kind`,`parent_id`); \ No newline at end of file diff --git a/drizzle/20261117211410_version-70-tracker-items/snapshot.json b/drizzle/20261117211410_version-70-tracker-items/snapshot.json new file mode 100644 index 000000000..e0bfefddc --- /dev/null +++ b/drizzle/20261117211410_version-70-tracker-items/snapshot.json @@ -0,0 +1,24463 @@ +{ + "version": "7", + "dialect": "sqlite", + "id": "35d7f4d6-47d2-4d77-8e79-4da4c0ee5f00", + "prevIds": [ + "87b01b60-dff7-42b0-a310-4bd9bac61da7" + ], + "ddl": [ + { + "name": "account_identities", + "entityType": "tables" + }, + { + "name": "accounts", + "entityType": "tables" + }, + { + "name": "agent_actions", + "entityType": "tables" + }, + { + "name": "aliases", + "entityType": "tables" + }, + { + "name": "attachments", + "entityType": "tables" + }, + { + "name": "bot_updates", + "entityType": "tables" + }, + { + "name": "bots", + "entityType": "tables" + }, + { + "name": "calendar_entries", + "entityType": "tables" + }, + { + "name": "calendar_entry_participants", + "entityType": "tables" + }, + { + "name": "calendar_entry_revisions", + "entityType": "tables" + }, + { + "name": "calendars", + "entityType": "tables" + }, + { + "name": "canonical_auto_tag_claims", + "entityType": "tables" + }, + { + "name": "canonical_tags", + "entityType": "tables" + }, + { + "name": "catalog_items", + "entityType": "tables" + }, + { + "name": "chat_event_people", + "entityType": "tables" + }, + { + "name": "chat_events", + "entityType": "tables" + }, + { + "name": "chat_members", + "entityType": "tables" + }, + { + "name": "chat_revision_source", + "entityType": "tables" + }, + { + "name": "chat_revisions", + "entityType": "tables" + }, + { + "name": "chats", + "entityType": "tables" + }, + { + "name": "chunk_messages", + "entityType": "tables" + }, + { + "name": "chunks", + "entityType": "tables" + }, + { + "name": "contracts", + "entityType": "tables" + }, + { + "name": "conversation_messages", + "entityType": "tables" + }, + { + "name": "conversation_readiness", + "entityType": "tables" + }, + { + "name": "conversation_state", + "entityType": "tables" + }, + { + "name": "conversations", + "entityType": "tables" + }, + { + "name": "crm_fields", + "entityType": "tables" + }, + { + "name": "crm_files", + "entityType": "tables" + }, + { + "name": "deals", + "entityType": "tables" + }, + { + "name": "decision_requests", + "entityType": "tables" + }, + { + "name": "decisions", + "entityType": "tables" + }, + { + "name": "document_annotation_transfers", + "entityType": "tables" + }, + { + "name": "document_index_pending", + "entityType": "tables" + }, + { + "name": "document_revisions", + "entityType": "tables" + }, + { + "name": "documents", + "entityType": "tables" + }, + { + "name": "email_index_pending", + "entityType": "tables" + }, + { + "name": "email_locations", + "entityType": "tables" + }, + { + "name": "email_mailboxes", + "entityType": "tables" + }, + { + "name": "email_recipients", + "entityType": "tables" + }, + { + "name": "email_threads", + "entityType": "tables" + }, + { + "name": "emails", + "entityType": "tables" + }, + { + "name": "embeddings", + "entityType": "tables" + }, + { + "name": "enrichments", + "entityType": "tables" + }, + { + "name": "entity_link_events", + "entityType": "tables" + }, + { + "name": "event_index_pending", + "entityType": "tables" + }, + { + "name": "event_series", + "entityType": "tables" + }, + { + "name": "events", + "entityType": "tables" + }, + { + "name": "fact_removals", + "entityType": "tables" + }, + { + "name": "facts", + "entityType": "tables" + }, + { + "name": "fetch_leases", + "entityType": "tables" + }, + { + "name": "files", + "entityType": "tables" + }, + { + "name": "financial_accounts", + "entityType": "tables" + }, + { + "name": "financial_transactions", + "entityType": "tables" + }, + { + "name": "identities", + "entityType": "tables" + }, + { + "name": "identity_link_events", + "entityType": "tables" + }, + { + "name": "identity_links", + "entityType": "tables" + }, + { + "name": "identity_revisions", + "entityType": "tables" + }, + { + "name": "invoice_lines", + "entityType": "tables" + }, + { + "name": "invoices", + "entityType": "tables" + }, + { + "name": "involvement_pending", + "entityType": "tables" + }, + { + "name": "involvements", + "entityType": "tables" + }, + { + "name": "leads", + "entityType": "tables" + }, + { + "name": "link_reviews", + "entityType": "tables" + }, + { + "name": "link_revisions", + "entityType": "tables" + }, + { + "name": "links", + "entityType": "tables" + }, + { + "name": "mail_rules", + "entityType": "tables" + }, + { + "name": "mailboxes", + "entityType": "tables" + }, + { + "name": "meeting_chat_messages", + "entityType": "tables" + }, + { + "name": "meeting_index_pending", + "entityType": "tables" + }, + { + "name": "meeting_participants", + "entityType": "tables" + }, + { + "name": "meeting_series", + "entityType": "tables" + }, + { + "name": "meeting_summaries", + "entityType": "tables" + }, + { + "name": "meeting_transcript_rows", + "entityType": "tables" + }, + { + "name": "meeting_transcripts", + "entityType": "tables" + }, + { + "name": "meetings", + "entityType": "tables" + }, + { + "name": "member_counts", + "entityType": "tables" + }, + { + "name": "member_observation_members", + "entityType": "tables" + }, + { + "name": "member_observations", + "entityType": "tables" + }, + { + "name": "member_stays", + "entityType": "tables" + }, + { + "name": "memories", + "entityType": "tables" + }, + { + "name": "memory_index_pending", + "entityType": "tables" + }, + { + "name": "mention_pending", + "entityType": "tables" + }, + { + "name": "mentions", + "entityType": "tables" + }, + { + "name": "message_counter_observations", + "entityType": "tables" + }, + { + "name": "message_links", + "entityType": "tables" + }, + { + "name": "message_reactions", + "entityType": "tables" + }, + { + "name": "message_revisions", + "entityType": "tables" + }, + { + "name": "message_stems_pending", + "entityType": "tables" + }, + { + "name": "message_transcripts", + "entityType": "tables" + }, + { + "name": "messages", + "entityType": "tables" + }, + { + "name": "note_index_pending", + "entityType": "tables" + }, + { + "name": "note_revisions", + "entityType": "tables" + }, + { + "name": "notes", + "entityType": "tables" + }, + { + "name": "order_lines", + "entityType": "tables" + }, + { + "name": "orders", + "entityType": "tables" + }, + { + "name": "organization_identities", + "entityType": "tables" + }, + { + "name": "organizations", + "entityType": "tables" + }, + { + "name": "payment_allocations", + "entityType": "tables" + }, + { + "name": "payments", + "entityType": "tables" + }, + { + "name": "persons", + "entityType": "tables" + }, + { + "name": "pipeline_stage_changes", + "entityType": "tables" + }, + { + "name": "pipeline_stages", + "entityType": "tables" + }, + { + "name": "pipelines", + "entityType": "tables" + }, + { + "name": "places", + "entityType": "tables" + }, + { + "name": "poll_votes", + "entityType": "tables" + }, + { + "name": "projects", + "entityType": "tables" + }, + { + "name": "proposed_actions", + "entityType": "tables" + }, + { + "name": "record_relations", + "entityType": "tables" + }, + { + "name": "records", + "entityType": "tables" + }, + { + "name": "reminders", + "entityType": "tables" + }, + { + "name": "search_index_state", + "entityType": "tables" + }, + { + "name": "searches", + "entityType": "tables" + }, + { + "name": "store_settings", + "entityType": "tables" + }, + { + "name": "subscription_prices", + "entityType": "tables" + }, + { + "name": "subscriptions", + "entityType": "tables" + }, + { + "name": "sync_cursors", + "entityType": "tables" + }, + { + "name": "sync_ranges", + "entityType": "tables" + }, + { + "name": "syncs", + "entityType": "tables" + }, + { + "name": "tag_consolidations", + "entityType": "tables" + }, + { + "name": "tag_redirects", + "entityType": "tables" + }, + { + "name": "taggings", + "entityType": "tables" + }, + { + "name": "task_assignments", + "entityType": "tables" + }, + { + "name": "task_events", + "entityType": "tables" + }, + { + "name": "task_index_pending", + "entityType": "tables" + }, + { + "name": "task_key_counters", + "entityType": "tables" + }, + { + "name": "task_pairs", + "entityType": "tables" + }, + { + "name": "tasks", + "entityType": "tables" + }, + { + "name": "templates", + "entityType": "tables" + }, + { + "name": "templates_history", + "entityType": "tables" + }, + { + "name": "tracker_items", + "entityType": "tables" + }, + { + "name": "transaction_splits", + "entityType": "tables" + }, + { + "name": "transcript_index_pending", + "entityType": "tables" + }, + { + "name": "vector_index_redo", + "entityType": "tables" + }, + { + "name": "vector_indexes", + "entityType": "tables" + }, + { + "table": "account_identities", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "last_messaged_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_score", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_signals", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_scored_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_demoted", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "address_book", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "provider", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "settings", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'personal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "actor_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "actor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "tool", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "tier", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "target_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "started_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "finished_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "aliasable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "aliasable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "display", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "attachable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "attachable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "width", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "height", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "duration", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "provider_ref", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "local_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extraction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extractor", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extraction_error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "content_sha256", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extracted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "local_path_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "contact", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "payload", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "received_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "handled_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "replayed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "owner_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "token_digest", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "last_seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "disabled_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "calendar_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "series_entry_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "event_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "event_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "ical_uid", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "original_starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "exception", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "all_day", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "start_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "end_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "recurrence_ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "event_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "transparency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "visibility", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "own_response", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "organizer_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "join_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "join_key", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "conference", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "sequence", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "etag", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "series_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "entry_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "email", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "response", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "optional", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "organizer", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "self", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "resource", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "entry_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "recurrence_ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "access_role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "primary_calendar", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "synced", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "tag_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "algorithm", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "score", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "fields", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'tag'", + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "sku", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "supplier_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "supplier_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "unit", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "unit_price", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "archived_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_event_people", + "name": "chat_event_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_event_people", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "source_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "action", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "actor_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "happened_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_members", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_members", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_members", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revision_source", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revision_source", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revision_source", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "field", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "old_value", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "new_value", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "source", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "unread_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "last_message_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "participants_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "username", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "membership_state", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "searchable", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "message_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "members_tracked_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "details_fetched_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "parent_chat_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "scope", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "muted", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "muted_until", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "archived", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "marked_unread", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "unread_counted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "title_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "chunk_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "first_message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "last_message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "text_start", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "text_end", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "chunkable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "chunkable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "start_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "end_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "scope", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "occurred_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "number", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "signed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "effective_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "expiration_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "auto_renew", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "renewal_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "renewal_unit", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "notice_days", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "terms", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "value", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "deal_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_messages", + "name": "conversation_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_messages", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "new_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "edited_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "deleted_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "chunks", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "embedded_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "current", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "stale", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "counted_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "chat_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "enabled_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "built_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "algorithm_version", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "current_build", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "first_message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "build", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "first_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "last_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "message_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "built_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "algorithm_version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "code", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "label", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "multiple", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "filterable", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "options", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "owner_kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "owner_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "owner_assignee", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "local_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "content_sha256", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "extraction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "extraction_error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "downloaded_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "downloaded_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "stage_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "amount", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "close_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "closed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "rank", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "token_digest", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "proposal_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "action", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "batch_digest", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "channel", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "bot_profile", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "chat_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "message_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "owner_user_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "expires_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "used_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "cancelled_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "statement", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "supersedes_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "source_key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "collection", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "snapshot_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "bindings_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "reference_map", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "document_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "file_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "extension", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "storage", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "local_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "content_hash", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "front_matter", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "extraction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "extraction_error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "language", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "export_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "pinned_file_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "mailbox_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "uidvalidity", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "uid", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "email_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_mailboxes", + "name": "email_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_mailboxes", + "name": "mailbox_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_mailboxes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "email_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "address", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "subject", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "last_email_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "emails_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "subject_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "email_thread_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "subject", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "from_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "from_address", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "from_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "sent_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "received_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "in_reply_to", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "references", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "body_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "body_html", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "snippet", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "outgoing", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "read", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "flagged", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "draft", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "headers", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "mail_rule_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "dims", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "vector", + "type": "blob", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "subject_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "subject_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "source_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "provider", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "tokens", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "linkable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "linkable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "entity_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "from_entity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "to_entity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "confidence", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "origin", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "event_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "origin", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "all_day", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "source_deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "fact_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "subject", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "removed_by", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "bot", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "removed_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "statement", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "subject_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "subject_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "occurred_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "supersedes_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "scope", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "anchor", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "holder", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "expires_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "path", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "path_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "parent_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "document_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "content_hash", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "institution", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "number_hint", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "holder_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "holder_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "opening_balance", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "opening_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "closed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "financial_account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "statement_date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "booked_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "counterparty_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "counterparty_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "counterparty_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "reference", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "payment_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "provider", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "username", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "bot", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "phone_hmac", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "email", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "phone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "from_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "to_person_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "person_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "confidence", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "source", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "username", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "marks", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "invoice_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "description", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "quantity", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "unit_price", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "catalog_item_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "number", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "issuer_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "issuer_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "counterparty_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "counterparty_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "total", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "issue_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "due_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "contract_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "subscription_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvement_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvement_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "subject_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "subject_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "occurred_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "stage_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "amount", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "close_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "closed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "rank", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "deal_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "linkable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "linkable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "entity_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "candidates", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "reason", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "chosen_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "decided_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "link_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "change", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "before", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "after", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "author", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "from_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "from_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "to_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "to_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "anchor", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "target_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "target_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "evidence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "confirmed", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "author", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "purpose", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "conditions", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "actions", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "protected", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "decided_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "sent_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "sender_participant_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "sender_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "recipient", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "display_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "email", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "joined_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "left_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "duration_ms", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "sessions", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "event_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "host_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "join_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "overview", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "sections", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "next_steps", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "content", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "doc_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "start_ms", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "end_ms", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "speaker_participant_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "speaker_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "format", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "language", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "content_hash", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "superseded_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "meeting_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "event_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "join_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "started_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "ended_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "duration_ms", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "host_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "participants_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "title_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "join_key", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "direction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "client_phone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "reported_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "listed_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "complete_list", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observation_members", + "name": "member_observation_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observation_members", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observation_members", + "name": "member_stay_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "observed_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "started_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "complete", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "reported_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "listed_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "first_seen_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "last_seen_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "joined_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "invited_by_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "left_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "subject_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "subject_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "confidence", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "last_verified_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "supersedes_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memory_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memory_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mention_pending", + "name": "source_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mention_pending", + "name": "source_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "source_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "source_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "source_field", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "start_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "end_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "domain", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "confidence", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "target_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "author", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "counter", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "value", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "parent_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "confidence", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "version", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "batch", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "build", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "stale_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "message_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "own", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "reaction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "reacted_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "edited_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_stems_pending", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "message_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "message_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "heard_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "thread_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sender_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sender_chat_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sender_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sent_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "edited_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "reply_to_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "reply_to", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "forward", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "outgoing", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "reactions", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "normalizer_version", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "mentions", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "thread_root_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "starred", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "delivery", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "note_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "notable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "notable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "author_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "author_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "order_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "description", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "quantity", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "unit_price", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "catalog_item_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "customer_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "customer_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "purpose", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "supplier_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "supplier_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "supplier_name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "number", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "total", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "order_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "fulfilled_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "invoice_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "payment_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "source_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "contract_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "deal_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'purchase'", + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "organization_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'personal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "payment_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "invoice_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payer_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payer_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payee_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payee_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payment_date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "reference", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "refund_of", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "subscription_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "owner", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "name_order", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "messages_from", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "task_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "last_contact", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "item_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "item_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "from_stage_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "to_stage_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "changed_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "pipeline_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "outcome", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'open'", + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "base_stage_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "base_confirmed", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'deal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "address", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "message_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "answers", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "voted_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'personal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "owner_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "owner_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "tasks_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "target_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "payload", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "proposed_by_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "proposed_by_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "decided_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "decided_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "executed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "result", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "verdict", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "record_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "target_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "target_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "amount", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "as_role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "fields", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "revision", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "entity_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "entity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "projected_fingerprint", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "batch_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "created_entity", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "task_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "due_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "timezone", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "state", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "lease_until", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "receipt", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "watermark", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "filled_through", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "terms_through", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "normalizer_version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "built_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "analyzer", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "command", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "params", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "language", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "fields_version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "last_run_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "runs", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "store_settings", + "name": "key", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "store_settings", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "store_settings", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "subscription_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "effective_from", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "supplier_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "supplier_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "customer_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "customer_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "catalog_item_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "contract_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "interval_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "interval_unit", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "start_date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "trial_end_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "next_renewal_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "cancelled_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "end_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "from_key", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "to_key", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "started_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "finished_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "counts", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "source_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "survivor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "source_member_ids", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "survivor_member_ids", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "actor_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "actor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "idempotency_key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "vocabulary_fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "preview_fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "counts", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "request_fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_redirects", + "name": "source_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_redirects", + "name": "survivor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_redirects", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "tag_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "taggable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "taggable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "main", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "author_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "author_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "task_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "assignee_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "assignee_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "task_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "actor_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "actor_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "changes", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_key_counters", + "name": "prefix", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_key_counters", + "name": "tasks_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "task_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "source_locator", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "other_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "score", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "band", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "levels", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "reasons", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decision", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decided_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decided_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "project_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "number", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "priority", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "parent_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "due_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "started_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "closed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "closed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "closed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "package_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_locator", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_group", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "resolution", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "verdict", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "next_check_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "title_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_reason_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "category", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "claimed_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "claimed_until", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_certainty", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_as", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_certainty", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "priority_score", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "agent", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "provider", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "channel", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "language", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "updated_by", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "channel", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "language", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "saved_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "saved_by", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "replaced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "parent_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "title_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "normalized_text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "source_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "archived_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "transaction_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "category", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "category_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "note", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transcript_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transcript_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_index_redo", + "name": "chunk_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "dims", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "ready", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "filled_through", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "account_identities_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "account_identities", + "name": "account_identities_in_address_book", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "address_book = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "accounts", + "name": "accounts_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "agent_actions", + "name": "agent_actions_by_started_at_desc", + "columns": [ + { + "value": "\"started_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "agent_actions", + "name": "agent_actions_by_actor_type_actor_id", + "columns": [ + { + "value": "actor_type", + "isExpression": false + }, + { + "value": "actor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "agent_actions", + "name": "agent_actions_by_target_type_target_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_displayed", + "columns": [ + { + "value": "aliasable_type", + "isExpression": false + }, + { + "value": "aliasable_id", + "isExpression": false + }, + { + "value": "ifnull(\"account_id\", 0)", + "isExpression": true + } + ], + "isUnique": true, + "where": "display = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_by_aliasable_type_aliasable_id_name_folded", + "columns": [ + { + "value": "aliasable_type", + "isExpression": false + }, + { + "value": "aliasable_id", + "isExpression": false + }, + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NULL AND aliasable_type = 'project' OR account_id IS NULL AND aliasable_type = 'tag'", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_by_aliasable_type_aliasable_id", + "columns": [ + { + "value": "aliasable_type", + "isExpression": false + }, + { + "value": "aliasable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "attachments", + "name": "attachments_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "attachments", + "name": "attachments_local_path_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "local_path IS NOT NULL AND local_path_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "bot_updates", + "name": "bot_updates_by_account_id_received_at_desc", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"received_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "bots", + "name": "bots_by_owner_person_id", + "columns": [ + { + "value": "owner_person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_calendar_id_starts_at", + "columns": [ + { + "value": "calendar_id", + "isExpression": false + }, + { + "value": "starts_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_ical_uid", + "columns": [ + { + "value": "ical_uid", + "isExpression": false + } + ], + "isUnique": false, + "where": "ical_uid IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_join_key", + "columns": [ + { + "value": "join_key", + "isExpression": false + } + ], + "isUnique": false, + "where": "join_key IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_calendar_id_series_external_id", + "columns": [ + { + "value": "calendar_id", + "isExpression": false + }, + { + "value": "series_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "series_external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_event_id", + "columns": [ + { + "value": "event_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_event_series_id", + "columns": [ + { + "value": "event_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_event_type_event_id", + "columns": [ + { + "value": "event_type", + "isExpression": false + }, + { + "value": "event_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_organizer_identity_id", + "columns": [ + { + "value": "organizer_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entry_participants", + "name": "calendar_entry_participants_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entry_revisions", + "name": "calendar_entry_revisions_by_entry_id_created_at", + "columns": [ + { + "value": "entry_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "canonical_auto_tag_claims", + "name": "canonical_auto_tag_claims_by_tag_id", + "columns": [ + { + "value": "tag_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_supplier_type_supplier_id_sku", + "columns": [ + { + "value": "supplier_type", + "isExpression": false + }, + { + "value": "supplier_id", + "isExpression": false + }, + { + "value": "sku", + "isExpression": false + } + ], + "isUnique": true, + "where": "supplier_id IS NOT NULL AND sku IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_sku", + "columns": [ + { + "value": "sku", + "isExpression": false + } + ], + "isUnique": true, + "where": "supplier_id IS NULL AND sku IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_event_people", + "name": "chat_event_people_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_events", + "name": "chat_events_by_chat_id_happened_at", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "happened_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_events", + "name": "chat_events_by_actor_identity_id", + "columns": [ + { + "value": "actor_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_members", + "name": "chat_members_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_revisions", + "name": "chat_revisions_by_chat_id_created_at", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_revisions", + "name": "chat_revisions_by_account_id_old_value", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "old_value", + "isExpression": false + } + ], + "isUnique": false, + "where": "field = 'external_id'", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chats", + "name": "chats_by_recency", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"last_message_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chats", + "name": "chats_title_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "title IS NOT NULL AND title_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chats", + "name": "chats_by_parent_chat_id", + "columns": [ + { + "value": "parent_chat_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunk_messages", + "name": "chunk_messages_by_first_message_id", + "columns": [ + { + "value": "first_message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunk_messages", + "name": "chunk_messages_by_last_message_id", + "columns": [ + { + "value": "last_message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_content_hash", + "columns": [ + { + "value": "content_hash", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_scope_occurred_at", + "columns": [ + { + "value": "scope", + "isExpression": false + }, + { + "value": "occurred_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_deal_id", + "columns": [ + { + "value": "deal_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversation_messages", + "name": "conversation_messages_by_message_id", + "columns": [ + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversation_readiness", + "name": "conversation_readiness_by_model", + "columns": [ + { + "value": "model", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversations", + "name": "conversations_by_chat", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "build", + "isExpression": false + }, + { + "value": "first_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversations", + "name": "conversations_by_first_message_id", + "columns": [ + { + "value": "first_message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "crm_files", + "name": "crm_files_by_account_id_owner_kind_owner_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "owner_kind", + "isExpression": false + }, + { + "value": "owner_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_account_id_external_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL AND external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_stage_id", + "columns": [ + { + "value": "stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decision_requests", + "name": "decision_requests_by_channel_bot_profile_chat_id_message_id", + "columns": [ + { + "value": "channel", + "isExpression": false + }, + { + "value": "bot_profile", + "isExpression": false + }, + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decisions", + "name": "decisions_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decisions", + "name": "decisions_by_supersedes_id", + "columns": [ + { + "value": "supersedes_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decisions", + "name": "decisions_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "document_revisions", + "name": "document_revisions_by_document_id", + "columns": [ + { + "value": "document_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_locations", + "name": "email_locations_by_email_id", + "columns": [ + { + "value": "email_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_mailboxes", + "name": "email_mailboxes_by_mailbox_id", + "columns": [ + { + "value": "mailbox_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_recipients", + "name": "email_recipients_by_email_id", + "columns": [ + { + "value": "email_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_recipients", + "name": "email_recipients_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_threads", + "name": "email_threads_subject_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "subject IS NOT NULL AND subject_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_time", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"sent_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_mail_rule_id", + "columns": [ + { + "value": "mail_rule_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "mail_rule_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_email_thread_id", + "columns": [ + { + "value": "email_thread_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_from_identity_id", + "columns": [ + { + "value": "from_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "entity_link_events", + "name": "entity_link_events_by_linkable_type_linkable_id", + "columns": [ + { + "value": "linkable_type", + "isExpression": false + }, + { + "value": "linkable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "entity_link_events", + "name": "entity_link_events_by_entity_type_to_entity_id", + "columns": [ + { + "value": "entity_type", + "isExpression": false + }, + { + "value": "to_entity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "events", + "name": "events_by_time", + "columns": [ + { + "value": "starts_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "events", + "name": "events_by_event_series_id", + "columns": [ + { + "value": "event_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "fact_removals", + "name": "fact_removals_by_removed_at", + "columns": [ + { + "value": "removed_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_subject_type_subject_id", + "columns": [ + { + "value": "subject_type", + "isExpression": false + }, + { + "value": "subject_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_supersedes_id", + "columns": [ + { + "value": "supersedes_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_by_account_id_path_folded", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "path_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_path_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "path_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_by_parent_id", + "columns": [ + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_by_document_id", + "columns": [ + { + "value": "document_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_by_holder_type_holder_id", + "columns": [ + { + "value": "holder_type", + "isExpression": false + }, + { + "value": "holder_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_financial_account_id_booked_date", + "columns": [ + { + "value": "financial_account_id", + "isExpression": false + }, + { + "value": "booked_date", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_payment_id", + "columns": [ + { + "value": "payment_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "payment_id IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_counterparty_type_counterparty_id", + "columns": [ + { + "value": "counterparty_type", + "isExpression": false + }, + { + "value": "counterparty_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identities", + "name": "identities_by_email", + "columns": [ + { + "value": "email", + "isExpression": false + } + ], + "isUnique": false, + "where": "email IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identities", + "name": "identities_name_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "name IS NOT NULL AND name_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_by_from_person_id", + "columns": [ + { + "value": "from_person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_by_to_person_id", + "columns": [ + { + "value": "to_person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_links", + "name": "identity_links_by_person_id", + "columns": [ + { + "value": "person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_revisions", + "name": "identity_revisions_by_identity", + "columns": [ + { + "value": "identity_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_by_catalog_item_id", + "columns": [ + { + "value": "catalog_item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_issuer_type_issuer_id", + "columns": [ + { + "value": "issuer_type", + "isExpression": false + }, + { + "value": "issuer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_counterparty_type_counterparty_id", + "columns": [ + { + "value": "counterparty_type", + "isExpression": false + }, + { + "value": "counterparty_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_contract_id", + "columns": [ + { + "value": "contract_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_subscription_id", + "columns": [ + { + "value": "subscription_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_person", + "columns": [ + { + "value": "person_id", + "isExpression": false + }, + { + "value": "\"occurred_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_identity", + "columns": [ + { + "value": "identity_id", + "isExpression": false + }, + { + "value": "\"occurred_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_subject_type_subject_id", + "columns": [ + { + "value": "subject_type", + "isExpression": false + }, + { + "value": "subject_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_account_id_external_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL AND external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_stage_id", + "columns": [ + { + "value": "stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_deal_id", + "columns": [ + { + "value": "deal_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "link_reviews", + "name": "link_reviews_by_status_created_at", + "columns": [ + { + "value": "status", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "link_revisions", + "name": "link_revisions_by_link_id_created_at", + "columns": [ + { + "value": "link_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_unresolved", + "columns": [ + { + "value": "target_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": "to_id IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_relationship_key", + "columns": [ + { + "value": "kind", + "isExpression": false + }, + { + "value": "from_type", + "isExpression": false + }, + { + "value": "from_id", + "isExpression": false + }, + { + "value": "to_type", + "isExpression": false + }, + { + "value": "to_id", + "isExpression": false + }, + { + "value": "ifnull(\"anchor\", '')", + "isExpression": true + }, + { + "value": "ifnull(\"role\", '')", + "isExpression": true + }, + { + "value": "ifnull(\"account_id\", 0)", + "isExpression": true + } + ], + "isUnique": true, + "where": "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'partner-of') AND to_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_by_from_type_from_id", + "columns": [ + { + "value": "from_type", + "isExpression": false + }, + { + "value": "from_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_by_to_type_to_id", + "columns": [ + { + "value": "to_type", + "isExpression": false + }, + { + "value": "to_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mailboxes", + "name": "mailboxes_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mailboxes", + "name": "mailboxes_name_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "name_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_by_meeting_id_external_id", + "columns": [ + { + "value": "meeting_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_by_meeting_id", + "columns": [ + { + "value": "meeting_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_by_sender_participant_id", + "columns": [ + { + "value": "sender_participant_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_series", + "name": "meeting_series_by_event_series_id", + "columns": [ + { + "value": "event_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_series", + "name": "meeting_series_by_host_identity_id", + "columns": [ + { + "value": "host_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_rows_by_speaker_participant_id", + "columns": [ + { + "value": "speaker_participant_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_transcripts", + "name": "meeting_transcripts_by_meeting_id", + "columns": [ + { + "value": "meeting_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_join_key", + "columns": [ + { + "value": "join_key", + "isExpression": false + } + ], + "isUnique": false, + "where": "join_key IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_join_key_to_fill", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "join_url IS NOT NULL AND join_key IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_time", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"started_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_account_id_title_folded", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "title_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_title_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "title IS NOT NULL AND title_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_meeting_series_id", + "columns": [ + { + "value": "meeting_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_event_id", + "columns": [ + { + "value": "event_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_host_identity_id", + "columns": [ + { + "value": "host_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_observation_members", + "name": "member_observation_members_by_member_stay_id", + "columns": [ + { + "value": "member_stay_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_observation_members", + "name": "member_observation_members_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_observations", + "name": "member_observations_by_chat_id_observed_at_id", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "observed_at", + "isExpression": false + }, + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_stays", + "name": "member_stays_open", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "left_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_stays", + "name": "member_stays_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_stays", + "name": "member_stays_by_invited_by_identity_id", + "columns": [ + { + "value": "invited_by_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_subject_type_subject_id", + "columns": [ + { + "value": "subject_type", + "isExpression": false + }, + { + "value": "subject_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_supersedes_id", + "columns": [ + { + "value": "supersedes_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_kind_value", + "columns": [ + { + "value": "kind", + "isExpression": false + }, + { + "value": "value", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_domain", + "columns": [ + { + "value": "domain", + "isExpression": false + } + ], + "isUnique": false, + "where": "domain IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_status_kind", + "columns": [ + { + "value": "status", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_target_type_target_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "target_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_links", + "name": "message_links_unique", + "columns": [ + { + "value": "message_id", + "isExpression": false + }, + { + "value": "ifnull(\"parent_id\", 0)", + "isExpression": true + }, + { + "value": "source", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + }, + { + "value": "ifnull(\"build\", 0)", + "isExpression": true + } + ], + "isUnique": true, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_links", + "name": "message_links_by_build", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "build", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_links", + "name": "message_links_by_parent_id", + "columns": [ + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_reactions", + "name": "message_reactions_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_revisions", + "name": "message_revisions_by_message_id", + "columns": [ + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_transcripts", + "name": "message_transcripts_by_message_id", + "columns": [ + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_time", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "\"sent_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_starred_by_time", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "\"sent_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": "starred = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_reply", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "reply_to_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "reply_to_external_id IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_account", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_to_normalize", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "normalized_text IS NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_sender_identity_id", + "columns": [ + { + "value": "sender_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_thread_root_id", + "columns": [ + { + "value": "thread_root_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "note_revisions", + "name": "note_revisions_by_note_id", + "columns": [ + { + "value": "note_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "notes", + "name": "notes_by_notable_type_notable_id", + "columns": [ + { + "value": "notable_type", + "isExpression": false + }, + { + "value": "notable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "notes", + "name": "notes_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "order_lines", + "name": "order_lines_by_catalog_item_id", + "columns": [ + { + "value": "catalog_item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_customer_type_customer_id", + "columns": [ + { + "value": "customer_type", + "isExpression": false + }, + { + "value": "customer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_supplier_type_supplier_id", + "columns": [ + { + "value": "supplier_type", + "isExpression": false + }, + { + "value": "supplier_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_invoice_id", + "columns": [ + { + "value": "invoice_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_payment_id", + "columns": [ + { + "value": "payment_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_contract_id", + "columns": [ + { + "value": "contract_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_deal_id", + "columns": [ + { + "value": "deal_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "organization_identities", + "name": "organization_identities_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_by_invoice_id", + "columns": [ + { + "value": "invoice_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_payer_type_payer_id", + "columns": [ + { + "value": "payer_type", + "isExpression": false + }, + { + "value": "payer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_payee_type_payee_id", + "columns": [ + { + "value": "payee_type", + "isExpression": false + }, + { + "value": "payee_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_refund_of", + "columns": [ + { + "value": "refund_of", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_subscription_id", + "columns": [ + { + "value": "subscription_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "persons", + "name": "persons_by_kind", + "columns": [ + { + "value": "kind", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "persons", + "name": "persons_kind_to_work_out", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "kind IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_item_type_item_id", + "columns": [ + { + "value": "item_type", + "isExpression": false + }, + { + "value": "item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_pipeline_id", + "columns": [ + { + "value": "pipeline_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_from_stage_id", + "columns": [ + { + "value": "from_stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_to_stage_id", + "columns": [ + { + "value": "to_stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_by_pipeline_id_external_id", + "columns": [ + { + "value": "pipeline_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_by_pipeline_id_position", + "columns": [ + { + "value": "pipeline_id", + "isExpression": false + }, + { + "value": "position", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_by_base_stage_id", + "columns": [ + { + "value": "base_stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipelines", + "name": "pipelines_by_account_id_kind_external_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL AND external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipelines", + "name": "pipelines_by_name_folded_kind", + "columns": [ + { + "value": "name_folded", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "poll_votes", + "name": "poll_votes_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_name_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "name_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_owner_type_owner_id", + "columns": [ + { + "value": "owner_type", + "isExpression": false + }, + { + "value": "owner_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_status_created_at", + "columns": [ + { + "value": "status", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_target_type_target_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_proposed_by_type_proposed_by_id", + "columns": [ + { + "value": "proposed_by_type", + "isExpression": false + }, + { + "value": "proposed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_decided_by_type_decided_by_id", + "columns": [ + { + "value": "decided_by_type", + "isExpression": false + }, + { + "value": "decided_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "record_relations", + "name": "record_relations_by_target_type_target_external_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "record_relations", + "name": "record_relations_by_target_id", + "columns": [ + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "records", + "name": "records_by_account_id_batch_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "batch_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "records", + "name": "records_by_entity_type_entity_id", + "columns": [ + { + "value": "entity_type", + "isExpression": false + }, + { + "value": "entity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "reminders", + "name": "reminders_due", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "state", + "isExpression": false + }, + { + "value": "due_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "reminders", + "name": "reminders_by_task_id", + "columns": [ + { + "value": "task_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "searches", + "name": "searches_history", + "columns": [ + { + "value": "command", + "isExpression": false + }, + { + "value": "params", + "isExpression": false + } + ], + "isUnique": true, + "where": "name IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "searches", + "name": "searches_by_last_run", + "columns": [ + { + "value": "\"last_run_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_by_subscription_id_effective_from", + "columns": [ + { + "value": "subscription_id", + "isExpression": false + }, + { + "value": "effective_from", + "isExpression": false + } + ], + "isUnique": true, + "where": "review <> 'rejected'", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_supplier_type_supplier_id", + "columns": [ + { + "value": "supplier_type", + "isExpression": false + }, + { + "value": "supplier_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_customer_type_customer_id", + "columns": [ + { + "value": "customer_type", + "isExpression": false + }, + { + "value": "customer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_catalog_item_id", + "columns": [ + { + "value": "catalog_item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_contract_id", + "columns": [ + { + "value": "contract_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "syncs", + "name": "syncs_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_by_source_id", + "columns": [ + { + "value": "source_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_by_survivor_id", + "columns": [ + { + "value": "survivor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_by_actor_type_actor_id", + "columns": [ + { + "value": "actor_type", + "isExpression": false + }, + { + "value": "actor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_redirects", + "name": "tag_redirects_by_survivor_id", + "columns": [ + { + "value": "survivor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "taggings", + "name": "taggings_main_topic", + "columns": [ + { + "value": "taggable_type", + "isExpression": false + }, + { + "value": "taggable_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "main = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "taggings", + "name": "taggings_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_assignments", + "name": "task_assignments_by_assignee_type_assignee_id", + "columns": [ + { + "value": "assignee_type", + "isExpression": false + }, + { + "value": "assignee_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_events", + "name": "task_events_by_task_id", + "columns": [ + { + "value": "task_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_events", + "name": "task_events_by_actor_type_actor_id", + "columns": [ + { + "value": "actor_type", + "isExpression": false + }, + { + "value": "actor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_pairs", + "name": "task_pairs_by_decision_created_at", + "columns": [ + { + "value": "decision", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_pairs", + "name": "task_pairs_by_other_id", + "columns": [ + { + "value": "other_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_pairs", + "name": "task_pairs_by_decided_by_type_decided_by_id", + "columns": [ + { + "value": "decided_by_type", + "isExpression": false + }, + { + "value": "decided_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_title_folded", + "columns": [ + { + "value": "title_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_close_reason_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "close_reason IS NOT NULL AND close_reason_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_status", + "columns": [ + { + "value": "project_id", + "isExpression": false + }, + { + "value": "status", + "isExpression": false + }, + { + "value": "due_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_project_id_status_next_check_at", + "columns": [ + { + "value": "project_id", + "isExpression": false + }, + { + "value": "status", + "isExpression": false + }, + { + "value": "next_check_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_project_id_source_locator", + "columns": [ + { + "value": "project_id", + "isExpression": false + }, + { + "value": "source_locator", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_source_group", + "columns": [ + { + "value": "source_group", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_provider_external_id", + "columns": [ + { + "value": "provider", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_parent_id", + "columns": [ + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_closed_by_type_closed_by_id", + "columns": [ + { + "value": "closed_by_type", + "isExpression": false + }, + { + "value": "closed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_close_suggested_by_type_close_suggested_by_id", + "columns": [ + { + "value": "close_suggested_by_type", + "isExpression": false + }, + { + "value": "close_suggested_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "templates_history", + "name": "templates_history_by_key_channel_language_id", + "columns": [ + { + "value": "key", + "isExpression": false + }, + { + "value": "channel", + "isExpression": false + }, + { + "value": "language", + "isExpression": false + }, + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tracker_items", + "name": "tracker_items_by_account_id_kind_parent_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + }, + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "transaction_splits", + "name": "transaction_splits_by_category_folded", + "columns": [ + { + "value": "category_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "transaction_splits", + "name": "transaction_splits_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "account_identities", + "name": "fk_account_identities_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "account_identities", + "name": "fk_account_identities_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "accounts", + "name": "fk_accounts_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "aliases", + "name": "fk_aliases_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "bot_updates", + "name": "fk_bot_updates_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "bots", + "name": "fk_bots_owner_person_id_persons_id_fk", + "columns": [ + "owner_person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_calendar_id_calendars_id_fk", + "columns": [ + "calendar_id" + ], + "tableTo": "calendars", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_series_entry_id_calendar_entries_id_fk", + "columns": [ + "series_entry_id" + ], + "tableTo": "calendar_entries", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_event_id_events_id_fk", + "columns": [ + "event_id" + ], + "tableTo": "events", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_event_series_id_event_series_id_fk", + "columns": [ + "event_series_id" + ], + "tableTo": "event_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_organizer_identity_id_identities_id_fk", + "columns": [ + "organizer_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entry_participants", + "name": "fk_calendar_entry_participants_entry_id_calendar_entries_id_fk", + "columns": [ + "entry_id" + ], + "tableTo": "calendar_entries", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entry_participants", + "name": "fk_calendar_entry_participants_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entry_revisions", + "name": "fk_calendar_entry_revisions_entry_id_calendar_entries_id_fk", + "columns": [ + "entry_id" + ], + "tableTo": "calendar_entries", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendars", + "name": "fk_calendars_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "canonical_auto_tag_claims", + "name": "fk_auto_tag_claims_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "canonical_auto_tag_claims", + "name": "fk_auto_tag_claims_tag_id_tags_id_fk", + "columns": [ + "tag_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_event_people", + "name": "fk_chat_event_people_chat_event_id_chat_events_id_fk", + "columns": [ + "chat_event_id" + ], + "tableTo": "chat_events", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_event_people", + "name": "fk_chat_event_people_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_events", + "name": "fk_chat_events_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_events", + "name": "fk_chat_events_actor_identity_id_identities_id_fk", + "columns": [ + "actor_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_members", + "name": "fk_chat_members_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_members", + "name": "fk_chat_members_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chats", + "name": "fk_chats_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chats", + "name": "fk_chats_parent_chat_id_chats_id_fk", + "columns": [ + "parent_chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunk_messages", + "name": "fk_chunk_messages_chunk_id_chunks_id_fk", + "columns": [ + "chunk_id" + ], + "tableTo": "chunks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunk_messages", + "name": "fk_chunk_messages_first_message_id_messages_id_fk", + "columns": [ + "first_message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunk_messages", + "name": "fk_chunk_messages_last_message_id_messages_id_fk", + "columns": [ + "last_message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunks", + "name": "fk_chunks_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunks", + "name": "fk_chunks_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "contracts", + "name": "fk_contracts_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "contracts", + "name": "fk_contracts_deal_id_deals_id_fk", + "columns": [ + "deal_id" + ], + "tableTo": "deals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_messages", + "name": "fk_conversation_messages_conversation_id_conversations_id_fk", + "columns": [ + "conversation_id" + ], + "tableTo": "conversations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_messages", + "name": "fk_conversation_messages_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_readiness", + "name": "fk_conversation_readiness_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_state", + "name": "fk_conversation_state_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversations", + "name": "fk_conversations_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversations", + "name": "fk_conversations_first_message_id_messages_id_fk", + "columns": [ + "first_message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "crm_fields", + "name": "fk_crm_fields_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "crm_files", + "name": "fk_crm_files_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_stage_id_pipeline_stages_id_fk", + "columns": [ + "stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "decisions", + "name": "fk_decisions_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "decisions", + "name": "fk_decisions_supersedes_id_decisions_id_fk", + "columns": [ + "supersedes_id" + ], + "tableTo": "decisions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "document_revisions", + "name": "fk_document_revisions_document_id_documents_id_fk", + "columns": [ + "document_id" + ], + "tableTo": "documents", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "documents", + "name": "fk_documents_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_locations", + "name": "fk_email_locations_mailbox_id_mailboxes_id_fk", + "columns": [ + "mailbox_id" + ], + "tableTo": "mailboxes", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_locations", + "name": "fk_email_locations_email_id_emails_id_fk", + "columns": [ + "email_id" + ], + "tableTo": "emails", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_mailboxes", + "name": "fk_email_mailboxes_email_id_emails_id_fk", + "columns": [ + "email_id" + ], + "tableTo": "emails", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_mailboxes", + "name": "fk_email_mailboxes_mailbox_id_mailboxes_id_fk", + "columns": [ + "mailbox_id" + ], + "tableTo": "mailboxes", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_recipients", + "name": "fk_email_recipients_email_id_emails_id_fk", + "columns": [ + "email_id" + ], + "tableTo": "emails", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_recipients", + "name": "fk_email_recipients_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_threads", + "name": "fk_email_threads_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "emails", + "name": "fk_emails_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "emails", + "name": "fk_emails_email_thread_id_email_threads_id_fk", + "columns": [ + "email_thread_id" + ], + "tableTo": "email_threads", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "emails", + "name": "fk_emails_from_identity_id_identities_id_fk", + "columns": [ + "from_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "events", + "name": "fk_events_event_series_id_event_series_id_fk", + "columns": [ + "event_series_id" + ], + "tableTo": "event_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "facts", + "name": "fk_facts_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "facts", + "name": "fk_facts_supersedes_id_facts_id_fk", + "columns": [ + "supersedes_id" + ], + "tableTo": "facts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "fetch_leases", + "name": "fk_fetch_leases_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "files", + "name": "fk_files_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "files", + "name": "fk_files_parent_id_files_id_fk", + "columns": [ + "parent_id" + ], + "tableTo": "files", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "files", + "name": "fk_files_document_id_documents_id_fk", + "columns": [ + "document_id" + ], + "tableTo": "documents", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "financial_transactions", + "name": "fk_financial_transactions_financial_account_id_financial_accounts_id_fk", + "columns": [ + "financial_account_id" + ], + "tableTo": "financial_accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "financial_transactions", + "name": "fk_financial_transactions_payment_id_payments_id_fk", + "columns": [ + "payment_id" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "financial_transactions", + "name": "fk_financial_transactions_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_link_events", + "name": "fk_identity_link_events_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_link_events", + "name": "fk_identity_link_events_from_person_id_persons_id_fk", + "columns": [ + "from_person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_link_events", + "name": "fk_identity_link_events_to_person_id_persons_id_fk", + "columns": [ + "to_person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_links", + "name": "fk_identity_links_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_links", + "name": "fk_identity_links_person_id_persons_id_fk", + "columns": [ + "person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_revisions", + "name": "fk_identity_revisions_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoice_lines", + "name": "fk_invoice_lines_invoice_id_invoices_id_fk", + "columns": [ + "invoice_id" + ], + "tableTo": "invoices", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoice_lines", + "name": "fk_invoice_lines_catalog_item_id_catalog_items_id_fk", + "columns": [ + "catalog_item_id" + ], + "tableTo": "catalog_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoices", + "name": "fk_invoices_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoices", + "name": "fk_invoices_contract_id_contracts_id_fk", + "columns": [ + "contract_id" + ], + "tableTo": "contracts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoices", + "name": "fk_invoices_subscription_id_subscriptions_id_fk", + "columns": [ + "subscription_id" + ], + "tableTo": "subscriptions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_person_id_persons_id_fk", + "columns": [ + "person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_stage_id_pipeline_stages_id_fk", + "columns": [ + "stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_deal_id_deals_id_fk", + "columns": [ + "deal_id" + ], + "tableTo": "deals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "mail_rules", + "name": "fk_mail_rules_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "mailboxes", + "name": "fk_mailboxes_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_chat_messages", + "name": "fk_meeting_chat_messages_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_chat_messages", + "name": "fk_meeting_chat_messages_sender_participant_id_meeting_participants_id_fk", + "columns": [ + "sender_participant_id" + ], + "tableTo": "meeting_participants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_participants", + "name": "fk_meeting_participants_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_participants", + "name": "fk_meeting_participants_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_series", + "name": "fk_meeting_series_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_series", + "name": "fk_meeting_series_event_series_id_event_series_id_fk", + "columns": [ + "event_series_id" + ], + "tableTo": "event_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_series", + "name": "fk_meeting_series_host_identity_id_identities_id_fk", + "columns": [ + "host_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_summaries", + "name": "fk_meeting_summaries_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_transcript_rows", + "name": "fk_meeting_transcript_rows_meeting_transcript_id_meeting_transcripts_id_fk", + "columns": [ + "meeting_transcript_id" + ], + "tableTo": "meeting_transcripts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_transcript_rows", + "name": "fk_meeting_transcript_rows_speaker_participant_id_meeting_participants_id_fk", + "columns": [ + "speaker_participant_id" + ], + "tableTo": "meeting_participants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_transcripts", + "name": "fk_meeting_transcripts_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_meeting_series_id_meeting_series_id_fk", + "columns": [ + "meeting_series_id" + ], + "tableTo": "meeting_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_event_id_events_id_fk", + "columns": [ + "event_id" + ], + "tableTo": "events", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_host_identity_id_identities_id_fk", + "columns": [ + "host_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_counts", + "name": "fk_member_counts_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observation_members", + "name": "fk_member_observation_members_member_observation_id_member_observations_id_fk", + "columns": [ + "member_observation_id" + ], + "tableTo": "member_observations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observation_members", + "name": "fk_member_observation_members_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observation_members", + "name": "fk_member_observation_members_member_stay_id_member_stays_id_fk", + "columns": [ + "member_stay_id" + ], + "tableTo": "member_stays", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observations", + "name": "fk_member_observations_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_stays", + "name": "fk_member_stays_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_stays", + "name": "fk_member_stays_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_stays", + "name": "fk_member_stays_invited_by_identity_id_identities_id_fk", + "columns": [ + "invited_by_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "memories", + "name": "fk_memories_supersedes_id_memories_id_fk", + "columns": [ + "supersedes_id" + ], + "tableTo": "memories", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "memories", + "name": "fk_memories_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_counter_observations", + "name": "fk_message_counter_observations_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_links", + "name": "fk_message_links_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_links", + "name": "fk_message_links_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_links", + "name": "fk_message_links_parent_id_messages_id_fk", + "columns": [ + "parent_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_reactions", + "name": "fk_message_reactions_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_reactions", + "name": "fk_message_reactions_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_revisions", + "name": "fk_message_revisions_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_transcripts", + "name": "fk_message_transcripts_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_transcripts", + "name": "fk_message_transcripts_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_sender_identity_id_identities_id_fk", + "columns": [ + "sender_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_thread_root_id_messages_id_fk", + "columns": [ + "thread_root_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "note_revisions", + "name": "fk_note_revisions_note_id_notes_id_fk", + "columns": [ + "note_id" + ], + "tableTo": "notes", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "order_lines", + "name": "fk_order_lines_order_id_orders_id_fk", + "columns": [ + "order_id" + ], + "tableTo": "orders", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "order_lines", + "name": "fk_order_lines_catalog_item_id_catalog_items_id_fk", + "columns": [ + "catalog_item_id" + ], + "tableTo": "catalog_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_invoice_id_invoices_id_fk", + "columns": [ + "invoice_id" + ], + "tableTo": "invoices", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_payment_id_payments_id_fk", + "columns": [ + "payment_id" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_contract_id_contracts_id_fk", + "columns": [ + "contract_id" + ], + "tableTo": "contracts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_deal_id_deals_id_fk", + "columns": [ + "deal_id" + ], + "tableTo": "deals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "organization_identities", + "name": "fk_organization_identities_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "organization_identities", + "name": "fk_organization_identities_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payment_allocations", + "name": "fk_payment_allocations_payment_id_payments_id_fk", + "columns": [ + "payment_id" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payment_allocations", + "name": "fk_payment_allocations_invoice_id_invoices_id_fk", + "columns": [ + "invoice_id" + ], + "tableTo": "invoices", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payments", + "name": "fk_payments_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payments", + "name": "fk_payments_refund_of_payments_id_fk", + "columns": [ + "refund_of" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payments", + "name": "fk_payments_subscription_id_subscriptions_id_fk", + "columns": [ + "subscription_id" + ], + "tableTo": "subscriptions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stage_changes", + "name": "fk_pipeline_stage_changes_pipeline_id_pipelines_id_fk", + "columns": [ + "pipeline_id" + ], + "tableTo": "pipelines", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stage_changes", + "name": "fk_pipeline_stage_changes_from_stage_id_pipeline_stages_id_fk", + "columns": [ + "from_stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stage_changes", + "name": "fk_pipeline_stage_changes_to_stage_id_pipeline_stages_id_fk", + "columns": [ + "to_stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stages", + "name": "fk_pipeline_stages_pipeline_id_pipelines_id_fk", + "columns": [ + "pipeline_id" + ], + "tableTo": "pipelines", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stages", + "name": "fk_pipeline_stages_base_stage_id_pipeline_stages_id_fk", + "columns": [ + "base_stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipelines", + "name": "fk_pipelines_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "poll_votes", + "name": "fk_poll_votes_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "poll_votes", + "name": "fk_poll_votes_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "projects", + "name": "fk_projects_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "projects", + "name": "fk_projects_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "proposed_actions", + "name": "fk_proposed_actions_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "record_relations", + "name": "fk_record_relations_record_id_records_id_fk", + "columns": [ + "record_id" + ], + "tableTo": "records", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "record_relations", + "name": "fk_record_relations_target_id_records_id_fk", + "columns": [ + "target_id" + ], + "tableTo": "records", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "records", + "name": "fk_records_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "reminders", + "name": "fk_reminders_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "reminders", + "name": "fk_reminders_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscription_prices", + "name": "fk_subscription_prices_subscription_id_subscriptions_id_fk", + "columns": [ + "subscription_id" + ], + "tableTo": "subscriptions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscriptions", + "name": "fk_subscriptions_catalog_item_id_catalog_items_id_fk", + "columns": [ + "catalog_item_id" + ], + "tableTo": "catalog_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscriptions", + "name": "fk_subscriptions_contract_id_contracts_id_fk", + "columns": [ + "contract_id" + ], + "tableTo": "contracts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscriptions", + "name": "fk_subscriptions_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "sync_cursors", + "name": "fk_sync_cursors_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "sync_ranges", + "name": "fk_sync_ranges_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "syncs", + "name": "fk_syncs_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_consolidations", + "name": "fk_tag_consolidations_source_id_canonical_tags_id_fk", + "columns": [ + "source_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_consolidations", + "name": "fk_tag_consolidations_survivor_id_canonical_tags_id_fk", + "columns": [ + "survivor_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_redirects", + "name": "fk_tag_redirects_source_id_canonical_tags_id_fk", + "columns": [ + "source_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_redirects", + "name": "fk_tag_redirects_survivor_id_canonical_tags_id_fk", + "columns": [ + "survivor_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "taggings", + "name": "fk_taggings_tag_id_tags_id_fk", + "columns": [ + "tag_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_assignments", + "name": "fk_task_assignments_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_events", + "name": "fk_task_events_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_pairs", + "name": "fk_task_pairs_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_pairs", + "name": "fk_task_pairs_other_id_tasks_id_fk", + "columns": [ + "other_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tasks", + "name": "fk_tasks_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tasks", + "name": "fk_tasks_parent_id_tasks_id_fk", + "columns": [ + "parent_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tracker_items", + "name": "fk_tracker_items_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "transaction_splits", + "name": "fk_transaction_splits_transaction_id_financial_transactions_id_fk", + "columns": [ + "transaction_id" + ], + "tableTo": "financial_transactions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "transaction_splits", + "name": "fk_transaction_splits_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "account_identities", + "name": "account_identities_pk", + "columns": [ + "account_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "canonical_auto_tag_claims", + "name": "auto_tag_claims_pk", + "columns": [ + "chat_id", + "tag_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_event_people", + "name": "chat_event_people_pk", + "columns": [ + "chat_event_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_members", + "name": "chat_members_pk", + "columns": [ + "chat_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversation_messages", + "name": "conversation_messages_pk", + "columns": [ + "conversation_id", + "message_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversation_readiness", + "name": "conversation_readiness_pk", + "columns": [ + "chat_id", + "model" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_annotation_transfers", + "name": "document_annotation_transfers_pk", + "columns": [ + "source_key", + "collection" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_index_pending", + "name": "document_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_index_pending", + "name": "email_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_locations", + "name": "email_locations_pk", + "columns": [ + "mailbox_id", + "uidvalidity", + "uid" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_mailboxes", + "name": "email_mailboxes_pk", + "columns": [ + "email_id", + "mailbox_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "embeddings", + "name": "embeddings_pk", + "columns": [ + "model", + "content_hash" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "enrichments", + "name": "enrichments_pk", + "columns": [ + "subject_type", + "subject_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "event_index_pending", + "name": "event_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "fetch_leases", + "name": "fetch_leases_pk", + "columns": [ + "chat_id", + "anchor" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "involvement_pending", + "name": "involvement_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_index_pending", + "name": "meeting_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_counts", + "name": "member_counts_pk", + "columns": [ + "chat_id", + "date" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_observation_members", + "name": "member_observation_members_pk", + "columns": [ + "member_observation_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "memory_index_pending", + "name": "memory_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mention_pending", + "name": "mention_pending_pk", + "columns": [ + "source_type", + "source_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_counter_observations", + "name": "message_counter_observations_pk", + "columns": [ + "message_id", + "counter" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "note_index_pending", + "name": "note_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sync_cursors", + "name": "sync_cursors_pk", + "columns": [ + "account_id", + "key" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sync_ranges", + "name": "sync_ranges_pk", + "columns": [ + "chat_id", + "from_key" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "task_index_pending", + "name": "task_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "templates", + "name": "templates_pk", + "columns": [ + "key", + "channel", + "language" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "transcript_index_pending", + "name": "transcript_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "accounts", + "name": "accounts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "agent_actions", + "name": "agent_actions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "aliases", + "name": "aliases_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "attachments", + "name": "attachments_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "bot_updates", + "name": "bot_updates_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "bots", + "name": "bots_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendar_entry_participants", + "name": "calendar_entry_participants_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendar_entry_revisions", + "name": "calendar_entry_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendars", + "name": "calendars_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "canonical_tags", + "name": "tags_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "catalog_items", + "name": "catalog_items_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_events", + "name": "chat_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_revision_source", + "name": "chat_revision_source_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_revisions", + "name": "chat_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chats", + "name": "chats_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chunk_messages", + "name": "chunk_messages_pk", + "columns": [ + "chunk_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chunks", + "name": "chunks_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "contracts", + "name": "contracts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversation_state", + "name": "conversation_state_pk", + "columns": [ + "chat_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversations", + "name": "conversations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "crm_fields", + "name": "crm_fields_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "crm_files", + "name": "crm_files_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "deals", + "name": "deals_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "decision_requests", + "name": "decision_requests_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "decisions", + "name": "decisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_revisions", + "name": "document_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "documents", + "name": "documents_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_recipients", + "name": "email_recipients_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_threads", + "name": "email_threads_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "emails", + "name": "emails_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "entity_link_events", + "name": "entity_link_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "event_series", + "name": "event_series_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "events", + "name": "events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "fact_removals", + "name": "fact_removals_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "facts", + "name": "facts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "files", + "name": "files_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identities", + "name": "identities_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identity_links", + "name": "identity_links_pk", + "columns": [ + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identity_revisions", + "name": "identity_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "invoices", + "name": "invoices_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "involvements", + "name": "involvements_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "leads", + "name": "leads_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "link_reviews", + "name": "link_reviews_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "link_revisions", + "name": "link_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "links", + "name": "links_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mail_rules", + "name": "mail_rules_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mailboxes", + "name": "mailboxes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_series", + "name": "meeting_series_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_summaries", + "name": "meeting_summaries_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_rows_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_transcripts", + "name": "meeting_transcripts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meetings", + "name": "meetings_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_observations", + "name": "member_observations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_stays", + "name": "member_stays_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "memories", + "name": "memories_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mentions", + "name": "mentions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_links", + "name": "message_links_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_reactions", + "name": "message_reactions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_revisions", + "name": "message_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_stems_pending", + "name": "message_stems_pending_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_transcripts", + "name": "message_transcripts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "messages", + "name": "messages_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "note_revisions", + "name": "note_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "notes", + "name": "notes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "order_lines", + "name": "order_lines_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "orders", + "name": "orders_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "organization_identities", + "name": "organization_identities_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "organizations", + "name": "organizations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "payments", + "name": "payments_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "persons", + "name": "persons_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "pipelines", + "name": "pipelines_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "places", + "name": "places_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "poll_votes", + "name": "poll_votes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "projects", + "name": "projects_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "record_relations", + "name": "record_relations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "records", + "name": "records_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "reminders", + "name": "reminders_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "search_index_state", + "name": "search_index_state_pk", + "columns": [ + "name" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "searches", + "name": "searches_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "store_settings", + "name": "store_settings_pk", + "columns": [ + "key" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "subscriptions", + "name": "subscriptions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "syncs", + "name": "syncs_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "tag_redirects", + "name": "tag_redirects_pk", + "columns": [ + "source_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "taggings", + "name": "taggings_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "task_assignments", + "name": "task_assignments_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "task_events", + "name": "task_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "task_key_counters", + "name": "task_key_counters_pk", + "columns": [ + "prefix" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "task_pairs", + "name": "task_pairs_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "tasks", + "name": "tasks_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "templates_history", + "name": "templates_history_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "tracker_items", + "name": "tracker_items_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "transaction_splits", + "name": "transaction_splits_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "vector_indexes", + "name": "vector_indexes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "accounts", + "name": "accounts_provider_external_id_unique", + "columns": [ + "provider", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "attachments", + "name": "attachments_attachable_type_attachable_id_position_unique", + "columns": [ + "attachable_type", + "attachable_id", + "position" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "bot_updates", + "name": "bot_updates_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_calendar_id_external_id_unique", + "columns": [ + "calendar_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_series_entry_id_original_starts_at_unique", + "columns": [ + "series_entry_id", + "original_starts_at" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "calendar_entry_participants", + "name": "calendar_entry_participants_entry_id_email_unique", + "columns": [ + "entry_id", + "email" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "calendars", + "name": "calendars_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "chat_events", + "name": "chat_events_chat_id_source_id_unique", + "columns": [ + "chat_id", + "source_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "chats", + "name": "chats_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "chunks", + "name": "chunks_chunkable_type_chunkable_id_position_unique", + "columns": [ + "chunkable_type", + "chunkable_id", + "position" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "crm_fields", + "name": "crm_fields_account_id_kind_code_unique", + "columns": [ + "account_id", + "kind", + "code" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "crm_files", + "name": "crm_files_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "documents", + "name": "documents_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "email_threads", + "name": "email_threads_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "emails", + "name": "emails_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "files", + "name": "files_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "identities", + "name": "identities_provider_external_id_unique", + "columns": [ + "provider", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_invoice_id_position_unique", + "columns": [ + "invoice_id", + "position" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "link_reviews", + "name": "link_reviews_linkable_type_linkable_id_entity_type_unique", + "columns": [ + "linkable_type", + "linkable_id", + "entity_type" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "mail_rules", + "name": "mail_rules_account_id_conditions_unique", + "columns": [ + "account_id", + "conditions" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "mailboxes", + "name": "mailboxes_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_meeting_id_identity_id_unique", + "columns": [ + "meeting_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "meeting_series", + "name": "meeting_series_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "meeting_summaries", + "name": "meeting_summaries_meeting_id_source_unique", + "columns": [ + "meeting_id", + "source" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_rows_meeting_transcript_id_position_unique", + "columns": [ + "meeting_transcript_id", + "position" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "meetings", + "name": "meetings_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "mentions", + "name": "mentions_source_type_source_id_source_field_start_offset_kind_unique", + "columns": [ + "source_type", + "source_id", + "source_field", + "start_offset", + "kind" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "message_reactions", + "name": "message_reactions_chat_id_message_external_id_identity_id_unique", + "columns": [ + "chat_id", + "message_external_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "message_transcripts", + "name": "message_transcripts_chat_id_message_external_id_unique", + "columns": [ + "chat_id", + "message_external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "messages", + "name": "messages_chat_id_external_id_unique", + "columns": [ + "chat_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "order_lines", + "name": "order_lines_order_id_position_unique", + "columns": [ + "order_id", + "position" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "organization_identities", + "name": "organization_identities_identity_id_organization_id_unique", + "columns": [ + "identity_id", + "organization_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_payment_id_invoice_id_unique", + "columns": [ + "payment_id", + "invoice_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_pipeline_id_name_folded_unique", + "columns": [ + "pipeline_id", + "name_folded" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "poll_votes", + "name": "poll_votes_chat_id_message_external_id_identity_id_unique", + "columns": [ + "chat_id", + "message_external_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "record_relations", + "name": "record_relations_record_id_role_target_type_target_external_id_unique", + "columns": [ + "record_id", + "role", + "target_type", + "target_external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "records", + "name": "records_account_id_type_external_id_unique", + "columns": [ + "account_id", + "type", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "taggings", + "name": "taggings_tag_id_taggable_type_taggable_id_unique", + "columns": [ + "tag_id", + "taggable_type", + "taggable_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "task_assignments", + "name": "task_assignments_task_id_assignee_type_assignee_id_role_unique", + "columns": [ + "task_id", + "assignee_type", + "assignee_id", + "role" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "task_pairs", + "name": "task_pairs_task_id_other_id_unique", + "columns": [ + "task_id", + "other_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "tasks", + "name": "tasks_project_id_number_unique", + "columns": [ + "project_id", + "number" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "tracker_items", + "name": "tracker_items_account_id_kind_external_id_unique", + "columns": [ + "account_id", + "kind", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "transaction_splits", + "name": "transaction_splits_transaction_id_position_unique", + "columns": [ + "transaction_id", + "position" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "bots", + "name": "bots_name_unique", + "columns": [ + "name" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "canonical_tags", + "name": "tags_name_unique", + "columns": [ + "name" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "decision_requests", + "name": "decision_requests_token_digest_unique", + "columns": [ + "token_digest" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "places", + "name": "places_folded_unique", + "columns": [ + "folded" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "projects", + "name": "projects_key_unique", + "columns": [ + "key" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "searches", + "name": "searches_name_unique", + "columns": [ + "name" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_idempotency_key_unique", + "columns": [ + "idempotency_key" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "tasks", + "name": "tasks_key_unique", + "columns": [ + "key" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "tasks", + "name": "tasks_package_id_unique", + "columns": [ + "package_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "vector_indexes", + "name": "vector_indexes_model_unique", + "columns": [ + "model" + ], + "nameExplicit": false, + "entityType": "uniques" + } + ], + "renames": [] +} \ No newline at end of file diff --git a/drizzle/20261117211414_version-70-tracker-item-words/migration.sql b/drizzle/20261117211414_version-70-tracker-item-words/migration.sql new file mode 100644 index 000000000..8fb2ed9a8 --- /dev/null +++ b/drizzle/20261117211414_version-70-tracker-item-words/migration.sql @@ -0,0 +1,17 @@ +-- Words of a tracker item's title and text, rowid = tracker_items.id: issues, projects and comments found by any word. +CREATE VIRTUAL TABLE tracker_item_words USING fts5( + normalized_text, + content = '', contentless_delete = 1, + tokenize = 'unicode61 remove_diacritics 2', prefix = '3');--> statement-breakpoint +CREATE TRIGGER tracker_item_words_ai AFTER INSERT ON tracker_items WHEN new.normalized_text <> '' BEGIN + INSERT INTO tracker_item_words (rowid, normalized_text) VALUES (new.id, new.normalized_text); +END;--> statement-breakpoint +CREATE TRIGGER tracker_item_words_au AFTER UPDATE OF normalized_text ON tracker_items + WHEN old.normalized_text IS NOT new.normalized_text BEGIN + DELETE FROM tracker_item_words WHERE rowid = old.id; + INSERT INTO tracker_item_words (rowid, normalized_text) + SELECT new.id, new.normalized_text WHERE new.normalized_text <> ''; +END;--> statement-breakpoint +CREATE TRIGGER tracker_item_words_ad AFTER DELETE ON tracker_items BEGIN + DELETE FROM tracker_item_words WHERE rowid = old.id; +END; diff --git a/drizzle/20261117211414_version-70-tracker-item-words/snapshot.json b/drizzle/20261117211414_version-70-tracker-item-words/snapshot.json new file mode 100644 index 000000000..1bd011b8a --- /dev/null +++ b/drizzle/20261117211414_version-70-tracker-item-words/snapshot.json @@ -0,0 +1,24463 @@ +{ + "id": "111e7db2-0761-4e20-a174-eefe3639ab03", + "prevIds": [ + "35d7f4d6-47d2-4d77-8e79-4da4c0ee5f00" + ], + "version": "7", + "dialect": "sqlite", + "ddl": [ + { + "name": "account_identities", + "entityType": "tables" + }, + { + "name": "accounts", + "entityType": "tables" + }, + { + "name": "agent_actions", + "entityType": "tables" + }, + { + "name": "aliases", + "entityType": "tables" + }, + { + "name": "attachments", + "entityType": "tables" + }, + { + "name": "bot_updates", + "entityType": "tables" + }, + { + "name": "bots", + "entityType": "tables" + }, + { + "name": "calendar_entries", + "entityType": "tables" + }, + { + "name": "calendar_entry_participants", + "entityType": "tables" + }, + { + "name": "calendar_entry_revisions", + "entityType": "tables" + }, + { + "name": "calendars", + "entityType": "tables" + }, + { + "name": "canonical_auto_tag_claims", + "entityType": "tables" + }, + { + "name": "canonical_tags", + "entityType": "tables" + }, + { + "name": "catalog_items", + "entityType": "tables" + }, + { + "name": "chat_event_people", + "entityType": "tables" + }, + { + "name": "chat_events", + "entityType": "tables" + }, + { + "name": "chat_members", + "entityType": "tables" + }, + { + "name": "chat_revision_source", + "entityType": "tables" + }, + { + "name": "chat_revisions", + "entityType": "tables" + }, + { + "name": "chats", + "entityType": "tables" + }, + { + "name": "chunk_messages", + "entityType": "tables" + }, + { + "name": "chunks", + "entityType": "tables" + }, + { + "name": "contracts", + "entityType": "tables" + }, + { + "name": "conversation_messages", + "entityType": "tables" + }, + { + "name": "conversation_readiness", + "entityType": "tables" + }, + { + "name": "conversation_state", + "entityType": "tables" + }, + { + "name": "conversations", + "entityType": "tables" + }, + { + "name": "crm_fields", + "entityType": "tables" + }, + { + "name": "crm_files", + "entityType": "tables" + }, + { + "name": "deals", + "entityType": "tables" + }, + { + "name": "decision_requests", + "entityType": "tables" + }, + { + "name": "decisions", + "entityType": "tables" + }, + { + "name": "document_annotation_transfers", + "entityType": "tables" + }, + { + "name": "document_index_pending", + "entityType": "tables" + }, + { + "name": "document_revisions", + "entityType": "tables" + }, + { + "name": "documents", + "entityType": "tables" + }, + { + "name": "email_index_pending", + "entityType": "tables" + }, + { + "name": "email_locations", + "entityType": "tables" + }, + { + "name": "email_mailboxes", + "entityType": "tables" + }, + { + "name": "email_recipients", + "entityType": "tables" + }, + { + "name": "email_threads", + "entityType": "tables" + }, + { + "name": "emails", + "entityType": "tables" + }, + { + "name": "embeddings", + "entityType": "tables" + }, + { + "name": "enrichments", + "entityType": "tables" + }, + { + "name": "entity_link_events", + "entityType": "tables" + }, + { + "name": "event_index_pending", + "entityType": "tables" + }, + { + "name": "event_series", + "entityType": "tables" + }, + { + "name": "events", + "entityType": "tables" + }, + { + "name": "fact_removals", + "entityType": "tables" + }, + { + "name": "facts", + "entityType": "tables" + }, + { + "name": "fetch_leases", + "entityType": "tables" + }, + { + "name": "files", + "entityType": "tables" + }, + { + "name": "financial_accounts", + "entityType": "tables" + }, + { + "name": "financial_transactions", + "entityType": "tables" + }, + { + "name": "identities", + "entityType": "tables" + }, + { + "name": "identity_link_events", + "entityType": "tables" + }, + { + "name": "identity_links", + "entityType": "tables" + }, + { + "name": "identity_revisions", + "entityType": "tables" + }, + { + "name": "invoice_lines", + "entityType": "tables" + }, + { + "name": "invoices", + "entityType": "tables" + }, + { + "name": "involvement_pending", + "entityType": "tables" + }, + { + "name": "involvements", + "entityType": "tables" + }, + { + "name": "leads", + "entityType": "tables" + }, + { + "name": "link_reviews", + "entityType": "tables" + }, + { + "name": "link_revisions", + "entityType": "tables" + }, + { + "name": "links", + "entityType": "tables" + }, + { + "name": "mail_rules", + "entityType": "tables" + }, + { + "name": "mailboxes", + "entityType": "tables" + }, + { + "name": "meeting_chat_messages", + "entityType": "tables" + }, + { + "name": "meeting_index_pending", + "entityType": "tables" + }, + { + "name": "meeting_participants", + "entityType": "tables" + }, + { + "name": "meeting_series", + "entityType": "tables" + }, + { + "name": "meeting_summaries", + "entityType": "tables" + }, + { + "name": "meeting_transcript_rows", + "entityType": "tables" + }, + { + "name": "meeting_transcripts", + "entityType": "tables" + }, + { + "name": "meetings", + "entityType": "tables" + }, + { + "name": "member_counts", + "entityType": "tables" + }, + { + "name": "member_observation_members", + "entityType": "tables" + }, + { + "name": "member_observations", + "entityType": "tables" + }, + { + "name": "member_stays", + "entityType": "tables" + }, + { + "name": "memories", + "entityType": "tables" + }, + { + "name": "memory_index_pending", + "entityType": "tables" + }, + { + "name": "mention_pending", + "entityType": "tables" + }, + { + "name": "mentions", + "entityType": "tables" + }, + { + "name": "message_counter_observations", + "entityType": "tables" + }, + { + "name": "message_links", + "entityType": "tables" + }, + { + "name": "message_reactions", + "entityType": "tables" + }, + { + "name": "message_revisions", + "entityType": "tables" + }, + { + "name": "message_stems_pending", + "entityType": "tables" + }, + { + "name": "message_transcripts", + "entityType": "tables" + }, + { + "name": "messages", + "entityType": "tables" + }, + { + "name": "note_index_pending", + "entityType": "tables" + }, + { + "name": "note_revisions", + "entityType": "tables" + }, + { + "name": "notes", + "entityType": "tables" + }, + { + "name": "order_lines", + "entityType": "tables" + }, + { + "name": "orders", + "entityType": "tables" + }, + { + "name": "organization_identities", + "entityType": "tables" + }, + { + "name": "organizations", + "entityType": "tables" + }, + { + "name": "payment_allocations", + "entityType": "tables" + }, + { + "name": "payments", + "entityType": "tables" + }, + { + "name": "persons", + "entityType": "tables" + }, + { + "name": "pipeline_stage_changes", + "entityType": "tables" + }, + { + "name": "pipeline_stages", + "entityType": "tables" + }, + { + "name": "pipelines", + "entityType": "tables" + }, + { + "name": "places", + "entityType": "tables" + }, + { + "name": "poll_votes", + "entityType": "tables" + }, + { + "name": "projects", + "entityType": "tables" + }, + { + "name": "proposed_actions", + "entityType": "tables" + }, + { + "name": "record_relations", + "entityType": "tables" + }, + { + "name": "records", + "entityType": "tables" + }, + { + "name": "reminders", + "entityType": "tables" + }, + { + "name": "search_index_state", + "entityType": "tables" + }, + { + "name": "searches", + "entityType": "tables" + }, + { + "name": "store_settings", + "entityType": "tables" + }, + { + "name": "subscription_prices", + "entityType": "tables" + }, + { + "name": "subscriptions", + "entityType": "tables" + }, + { + "name": "sync_cursors", + "entityType": "tables" + }, + { + "name": "sync_ranges", + "entityType": "tables" + }, + { + "name": "syncs", + "entityType": "tables" + }, + { + "name": "tag_consolidations", + "entityType": "tables" + }, + { + "name": "tag_redirects", + "entityType": "tables" + }, + { + "name": "taggings", + "entityType": "tables" + }, + { + "name": "task_assignments", + "entityType": "tables" + }, + { + "name": "task_events", + "entityType": "tables" + }, + { + "name": "task_index_pending", + "entityType": "tables" + }, + { + "name": "task_key_counters", + "entityType": "tables" + }, + { + "name": "task_pairs", + "entityType": "tables" + }, + { + "name": "tasks", + "entityType": "tables" + }, + { + "name": "templates", + "entityType": "tables" + }, + { + "name": "templates_history", + "entityType": "tables" + }, + { + "name": "tracker_items", + "entityType": "tables" + }, + { + "name": "transaction_splits", + "entityType": "tables" + }, + { + "name": "transcript_index_pending", + "entityType": "tables" + }, + { + "name": "vector_index_redo", + "entityType": "tables" + }, + { + "name": "vector_indexes", + "entityType": "tables" + }, + { + "table": "account_identities", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "last_messaged_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_score", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_signals", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_scored_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_demoted", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "address_book", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "provider", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "settings", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'personal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "actor_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "actor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "tool", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "tier", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "target_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "started_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "finished_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "aliasable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "aliasable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "display", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "attachable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "attachable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "width", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "height", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "duration", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "provider_ref", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "local_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extraction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extractor", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extraction_error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "content_sha256", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extracted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "local_path_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "contact", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "payload", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "received_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "handled_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "replayed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "owner_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "token_digest", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "last_seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "disabled_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "calendar_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "series_entry_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "event_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "event_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "ical_uid", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "original_starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "exception", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "all_day", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "start_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "end_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "recurrence_ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "event_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "transparency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "visibility", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "own_response", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "organizer_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "join_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "join_key", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "conference", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "sequence", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "etag", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "series_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "entry_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "email", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "response", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "optional", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "organizer", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "self", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "resource", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "entry_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "recurrence_ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "access_role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "primary_calendar", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "synced", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "tag_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "algorithm", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "score", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "fields", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'tag'", + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "sku", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "supplier_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "supplier_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "unit", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "unit_price", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "archived_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_event_people", + "name": "chat_event_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_event_people", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "source_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "action", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "actor_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "happened_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_members", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_members", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_members", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revision_source", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revision_source", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revision_source", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "field", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "old_value", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "new_value", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "source", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "unread_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "last_message_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "participants_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "username", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "membership_state", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "searchable", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "message_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "members_tracked_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "details_fetched_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "parent_chat_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "scope", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "muted", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "muted_until", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "archived", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "marked_unread", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "unread_counted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "title_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "chunk_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "first_message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "last_message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "text_start", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "text_end", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "chunkable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "chunkable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "start_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "end_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "scope", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "occurred_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "number", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "signed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "effective_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "expiration_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "auto_renew", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "renewal_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "renewal_unit", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "notice_days", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "terms", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "value", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "deal_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_messages", + "name": "conversation_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_messages", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "new_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "edited_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "deleted_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "chunks", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "embedded_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "current", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "stale", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "counted_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "chat_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "enabled_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "built_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "algorithm_version", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "current_build", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "first_message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "build", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "first_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "last_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "message_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "built_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "algorithm_version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "code", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "label", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "multiple", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "filterable", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "options", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "owner_kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "owner_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "owner_assignee", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "local_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "content_sha256", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "extraction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "extraction_error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "downloaded_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "downloaded_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "stage_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "amount", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "close_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "closed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "rank", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "token_digest", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "proposal_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "action", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "batch_digest", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "channel", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "bot_profile", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "chat_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "message_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "owner_user_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "expires_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "used_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "cancelled_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "statement", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "supersedes_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "source_key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "collection", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "snapshot_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "bindings_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "reference_map", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "document_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "file_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "extension", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "storage", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "local_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "content_hash", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "front_matter", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "extraction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "extraction_error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "language", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "export_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "pinned_file_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "mailbox_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "uidvalidity", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "uid", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "email_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_mailboxes", + "name": "email_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_mailboxes", + "name": "mailbox_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_mailboxes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "email_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "address", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "subject", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "last_email_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "emails_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "subject_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "email_thread_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "subject", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "from_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "from_address", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "from_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "sent_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "received_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "in_reply_to", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "references", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "body_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "body_html", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "snippet", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "outgoing", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "read", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "flagged", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "draft", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "headers", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "mail_rule_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "dims", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "vector", + "type": "blob", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "subject_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "subject_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "source_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "provider", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "tokens", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "linkable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "linkable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "entity_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "from_entity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "to_entity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "confidence", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "origin", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "event_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "origin", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "all_day", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "source_deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "fact_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "subject", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "removed_by", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "bot", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "removed_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "statement", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "subject_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "subject_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "occurred_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "supersedes_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "scope", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "anchor", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "holder", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "expires_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "path", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "path_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "parent_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "document_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "content_hash", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "institution", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "number_hint", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "holder_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "holder_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "opening_balance", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "opening_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "closed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "financial_account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "statement_date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "booked_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "counterparty_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "counterparty_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "counterparty_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "reference", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "payment_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "provider", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "username", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "bot", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "phone_hmac", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "email", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "phone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "from_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "to_person_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "person_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "confidence", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "source", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "username", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "marks", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "invoice_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "description", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "quantity", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "unit_price", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "catalog_item_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "number", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "issuer_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "issuer_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "counterparty_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "counterparty_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "total", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "issue_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "due_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "contract_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "subscription_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvement_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvement_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "subject_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "subject_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "occurred_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "stage_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "amount", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "close_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "closed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "rank", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "deal_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "linkable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "linkable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "entity_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "candidates", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "reason", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "chosen_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "decided_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "link_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "change", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "before", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "after", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "author", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "from_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "from_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "to_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "to_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "anchor", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "target_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "target_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "evidence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "confirmed", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "author", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "purpose", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "conditions", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "actions", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "protected", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "decided_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "sent_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "sender_participant_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "sender_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "recipient", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "display_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "email", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "joined_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "left_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "duration_ms", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "sessions", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "event_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "host_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "join_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "overview", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "sections", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "next_steps", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "content", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "doc_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "start_ms", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "end_ms", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "speaker_participant_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "speaker_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "format", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "language", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "content_hash", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "superseded_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "meeting_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "event_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "join_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "started_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "ended_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "duration_ms", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "host_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "participants_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "title_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "join_key", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "direction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "client_phone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "reported_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "listed_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "complete_list", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observation_members", + "name": "member_observation_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observation_members", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observation_members", + "name": "member_stay_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "observed_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "started_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "complete", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "reported_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "listed_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "first_seen_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "last_seen_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "joined_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "invited_by_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "left_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "subject_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "subject_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "confidence", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "last_verified_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "supersedes_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memory_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memory_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mention_pending", + "name": "source_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mention_pending", + "name": "source_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "source_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "source_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "source_field", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "start_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "end_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "domain", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "confidence", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "target_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "author", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "counter", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "value", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "parent_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "confidence", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "version", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "batch", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "build", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "stale_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "message_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "own", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "reaction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "reacted_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "edited_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_stems_pending", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "message_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "message_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "heard_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "thread_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sender_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sender_chat_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sender_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sent_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "edited_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "reply_to_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "reply_to", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "forward", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "outgoing", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "reactions", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "normalizer_version", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "mentions", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "thread_root_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "starred", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "delivery", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "note_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "notable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "notable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "author_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "author_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "order_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "description", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "quantity", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "unit_price", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "catalog_item_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "customer_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "customer_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "purpose", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "supplier_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "supplier_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "supplier_name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "number", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "total", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "order_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "fulfilled_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "invoice_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "payment_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "source_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "contract_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "deal_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'purchase'", + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "organization_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'personal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "payment_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "invoice_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payer_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payer_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payee_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payee_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payment_date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "reference", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "refund_of", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "subscription_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "owner", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "name_order", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "messages_from", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "task_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "last_contact", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "item_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "item_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "from_stage_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "to_stage_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "changed_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "pipeline_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "outcome", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'open'", + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "base_stage_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "base_confirmed", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'deal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "address", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "message_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "answers", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "voted_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'personal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "owner_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "owner_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "tasks_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "target_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "payload", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "proposed_by_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "proposed_by_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "decided_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "decided_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "executed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "result", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "verdict", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "record_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "target_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "target_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "amount", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "as_role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "fields", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "revision", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "entity_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "entity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "projected_fingerprint", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "batch_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "created_entity", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "task_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "due_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "timezone", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "state", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "lease_until", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "receipt", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "watermark", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "filled_through", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "terms_through", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "normalizer_version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "built_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "analyzer", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "command", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "params", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "language", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "fields_version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "last_run_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "runs", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "store_settings", + "name": "key", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "store_settings", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "store_settings", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "subscription_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "effective_from", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "supplier_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "supplier_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "customer_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "customer_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "catalog_item_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "contract_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "interval_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "interval_unit", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "start_date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "trial_end_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "next_renewal_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "cancelled_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "end_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "from_key", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "to_key", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "started_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "finished_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "counts", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "source_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "survivor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "source_member_ids", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "survivor_member_ids", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "actor_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "actor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "idempotency_key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "vocabulary_fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "preview_fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "counts", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "request_fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_redirects", + "name": "source_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_redirects", + "name": "survivor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_redirects", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "tag_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "taggable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "taggable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "main", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "author_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "author_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "task_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "assignee_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "assignee_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "task_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "actor_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "actor_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "changes", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_key_counters", + "name": "prefix", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_key_counters", + "name": "tasks_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "task_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "source_locator", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "other_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "score", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "band", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "levels", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "reasons", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decision", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decided_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decided_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "project_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "number", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "priority", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "parent_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "due_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "started_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "closed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "closed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "closed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "package_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_locator", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_group", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "resolution", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "verdict", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "next_check_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "title_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_reason_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "category", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "claimed_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "claimed_until", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_certainty", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_as", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_certainty", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "priority_score", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "agent", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "provider", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "channel", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "language", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "updated_by", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "channel", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "language", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "saved_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "saved_by", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "replaced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "parent_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "title_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "normalized_text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "source_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "archived_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "transaction_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "category", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "category_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "note", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transcript_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transcript_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_index_redo", + "name": "chunk_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "dims", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "ready", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "filled_through", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "account_identities_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "account_identities", + "name": "account_identities_in_address_book", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "address_book = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "accounts", + "name": "accounts_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "agent_actions", + "name": "agent_actions_by_started_at_desc", + "columns": [ + { + "value": "\"started_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "agent_actions", + "name": "agent_actions_by_actor_type_actor_id", + "columns": [ + { + "value": "actor_type", + "isExpression": false + }, + { + "value": "actor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "agent_actions", + "name": "agent_actions_by_target_type_target_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_displayed", + "columns": [ + { + "value": "aliasable_type", + "isExpression": false + }, + { + "value": "aliasable_id", + "isExpression": false + }, + { + "value": "ifnull(\"account_id\", 0)", + "isExpression": true + } + ], + "isUnique": true, + "where": "display = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_by_aliasable_type_aliasable_id_name_folded", + "columns": [ + { + "value": "aliasable_type", + "isExpression": false + }, + { + "value": "aliasable_id", + "isExpression": false + }, + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NULL AND aliasable_type = 'project' OR account_id IS NULL AND aliasable_type = 'tag'", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_by_aliasable_type_aliasable_id", + "columns": [ + { + "value": "aliasable_type", + "isExpression": false + }, + { + "value": "aliasable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "attachments", + "name": "attachments_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "attachments", + "name": "attachments_local_path_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "local_path IS NOT NULL AND local_path_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "bot_updates", + "name": "bot_updates_by_account_id_received_at_desc", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"received_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "bots", + "name": "bots_by_owner_person_id", + "columns": [ + { + "value": "owner_person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_calendar_id_starts_at", + "columns": [ + { + "value": "calendar_id", + "isExpression": false + }, + { + "value": "starts_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_ical_uid", + "columns": [ + { + "value": "ical_uid", + "isExpression": false + } + ], + "isUnique": false, + "where": "ical_uid IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_join_key", + "columns": [ + { + "value": "join_key", + "isExpression": false + } + ], + "isUnique": false, + "where": "join_key IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_calendar_id_series_external_id", + "columns": [ + { + "value": "calendar_id", + "isExpression": false + }, + { + "value": "series_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "series_external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_event_id", + "columns": [ + { + "value": "event_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_event_series_id", + "columns": [ + { + "value": "event_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_event_type_event_id", + "columns": [ + { + "value": "event_type", + "isExpression": false + }, + { + "value": "event_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_organizer_identity_id", + "columns": [ + { + "value": "organizer_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entry_participants", + "name": "calendar_entry_participants_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entry_revisions", + "name": "calendar_entry_revisions_by_entry_id_created_at", + "columns": [ + { + "value": "entry_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "canonical_auto_tag_claims", + "name": "canonical_auto_tag_claims_by_tag_id", + "columns": [ + { + "value": "tag_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_supplier_type_supplier_id_sku", + "columns": [ + { + "value": "supplier_type", + "isExpression": false + }, + { + "value": "supplier_id", + "isExpression": false + }, + { + "value": "sku", + "isExpression": false + } + ], + "isUnique": true, + "where": "supplier_id IS NOT NULL AND sku IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_sku", + "columns": [ + { + "value": "sku", + "isExpression": false + } + ], + "isUnique": true, + "where": "supplier_id IS NULL AND sku IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_event_people", + "name": "chat_event_people_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_events", + "name": "chat_events_by_chat_id_happened_at", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "happened_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_events", + "name": "chat_events_by_actor_identity_id", + "columns": [ + { + "value": "actor_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_members", + "name": "chat_members_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_revisions", + "name": "chat_revisions_by_chat_id_created_at", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_revisions", + "name": "chat_revisions_by_account_id_old_value", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "old_value", + "isExpression": false + } + ], + "isUnique": false, + "where": "field = 'external_id'", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chats", + "name": "chats_by_recency", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"last_message_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chats", + "name": "chats_title_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "title IS NOT NULL AND title_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chats", + "name": "chats_by_parent_chat_id", + "columns": [ + { + "value": "parent_chat_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunk_messages", + "name": "chunk_messages_by_first_message_id", + "columns": [ + { + "value": "first_message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunk_messages", + "name": "chunk_messages_by_last_message_id", + "columns": [ + { + "value": "last_message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_content_hash", + "columns": [ + { + "value": "content_hash", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_scope_occurred_at", + "columns": [ + { + "value": "scope", + "isExpression": false + }, + { + "value": "occurred_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_deal_id", + "columns": [ + { + "value": "deal_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversation_messages", + "name": "conversation_messages_by_message_id", + "columns": [ + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversation_readiness", + "name": "conversation_readiness_by_model", + "columns": [ + { + "value": "model", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversations", + "name": "conversations_by_chat", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "build", + "isExpression": false + }, + { + "value": "first_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversations", + "name": "conversations_by_first_message_id", + "columns": [ + { + "value": "first_message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "crm_files", + "name": "crm_files_by_account_id_owner_kind_owner_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "owner_kind", + "isExpression": false + }, + { + "value": "owner_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_account_id_external_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL AND external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_stage_id", + "columns": [ + { + "value": "stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decision_requests", + "name": "decision_requests_by_channel_bot_profile_chat_id_message_id", + "columns": [ + { + "value": "channel", + "isExpression": false + }, + { + "value": "bot_profile", + "isExpression": false + }, + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decisions", + "name": "decisions_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decisions", + "name": "decisions_by_supersedes_id", + "columns": [ + { + "value": "supersedes_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decisions", + "name": "decisions_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "document_revisions", + "name": "document_revisions_by_document_id", + "columns": [ + { + "value": "document_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_locations", + "name": "email_locations_by_email_id", + "columns": [ + { + "value": "email_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_mailboxes", + "name": "email_mailboxes_by_mailbox_id", + "columns": [ + { + "value": "mailbox_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_recipients", + "name": "email_recipients_by_email_id", + "columns": [ + { + "value": "email_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_recipients", + "name": "email_recipients_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_threads", + "name": "email_threads_subject_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "subject IS NOT NULL AND subject_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_time", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"sent_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_mail_rule_id", + "columns": [ + { + "value": "mail_rule_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "mail_rule_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_email_thread_id", + "columns": [ + { + "value": "email_thread_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_from_identity_id", + "columns": [ + { + "value": "from_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "entity_link_events", + "name": "entity_link_events_by_linkable_type_linkable_id", + "columns": [ + { + "value": "linkable_type", + "isExpression": false + }, + { + "value": "linkable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "entity_link_events", + "name": "entity_link_events_by_entity_type_to_entity_id", + "columns": [ + { + "value": "entity_type", + "isExpression": false + }, + { + "value": "to_entity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "events", + "name": "events_by_time", + "columns": [ + { + "value": "starts_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "events", + "name": "events_by_event_series_id", + "columns": [ + { + "value": "event_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "fact_removals", + "name": "fact_removals_by_removed_at", + "columns": [ + { + "value": "removed_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_subject_type_subject_id", + "columns": [ + { + "value": "subject_type", + "isExpression": false + }, + { + "value": "subject_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_supersedes_id", + "columns": [ + { + "value": "supersedes_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_by_account_id_path_folded", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "path_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_path_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "path_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_by_parent_id", + "columns": [ + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_by_document_id", + "columns": [ + { + "value": "document_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_by_holder_type_holder_id", + "columns": [ + { + "value": "holder_type", + "isExpression": false + }, + { + "value": "holder_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_financial_account_id_booked_date", + "columns": [ + { + "value": "financial_account_id", + "isExpression": false + }, + { + "value": "booked_date", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_payment_id", + "columns": [ + { + "value": "payment_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "payment_id IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_counterparty_type_counterparty_id", + "columns": [ + { + "value": "counterparty_type", + "isExpression": false + }, + { + "value": "counterparty_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identities", + "name": "identities_by_email", + "columns": [ + { + "value": "email", + "isExpression": false + } + ], + "isUnique": false, + "where": "email IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identities", + "name": "identities_name_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "name IS NOT NULL AND name_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_by_from_person_id", + "columns": [ + { + "value": "from_person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_by_to_person_id", + "columns": [ + { + "value": "to_person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_links", + "name": "identity_links_by_person_id", + "columns": [ + { + "value": "person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_revisions", + "name": "identity_revisions_by_identity", + "columns": [ + { + "value": "identity_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_by_catalog_item_id", + "columns": [ + { + "value": "catalog_item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_issuer_type_issuer_id", + "columns": [ + { + "value": "issuer_type", + "isExpression": false + }, + { + "value": "issuer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_counterparty_type_counterparty_id", + "columns": [ + { + "value": "counterparty_type", + "isExpression": false + }, + { + "value": "counterparty_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_contract_id", + "columns": [ + { + "value": "contract_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_subscription_id", + "columns": [ + { + "value": "subscription_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_person", + "columns": [ + { + "value": "person_id", + "isExpression": false + }, + { + "value": "\"occurred_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_identity", + "columns": [ + { + "value": "identity_id", + "isExpression": false + }, + { + "value": "\"occurred_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_subject_type_subject_id", + "columns": [ + { + "value": "subject_type", + "isExpression": false + }, + { + "value": "subject_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_account_id_external_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL AND external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_stage_id", + "columns": [ + { + "value": "stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_deal_id", + "columns": [ + { + "value": "deal_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "link_reviews", + "name": "link_reviews_by_status_created_at", + "columns": [ + { + "value": "status", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "link_revisions", + "name": "link_revisions_by_link_id_created_at", + "columns": [ + { + "value": "link_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_unresolved", + "columns": [ + { + "value": "target_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": "to_id IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_relationship_key", + "columns": [ + { + "value": "kind", + "isExpression": false + }, + { + "value": "from_type", + "isExpression": false + }, + { + "value": "from_id", + "isExpression": false + }, + { + "value": "to_type", + "isExpression": false + }, + { + "value": "to_id", + "isExpression": false + }, + { + "value": "ifnull(\"anchor\", '')", + "isExpression": true + }, + { + "value": "ifnull(\"role\", '')", + "isExpression": true + }, + { + "value": "ifnull(\"account_id\", 0)", + "isExpression": true + } + ], + "isUnique": true, + "where": "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'partner-of') AND to_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_by_from_type_from_id", + "columns": [ + { + "value": "from_type", + "isExpression": false + }, + { + "value": "from_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_by_to_type_to_id", + "columns": [ + { + "value": "to_type", + "isExpression": false + }, + { + "value": "to_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mailboxes", + "name": "mailboxes_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mailboxes", + "name": "mailboxes_name_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "name_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_by_meeting_id_external_id", + "columns": [ + { + "value": "meeting_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_by_meeting_id", + "columns": [ + { + "value": "meeting_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_by_sender_participant_id", + "columns": [ + { + "value": "sender_participant_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_series", + "name": "meeting_series_by_event_series_id", + "columns": [ + { + "value": "event_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_series", + "name": "meeting_series_by_host_identity_id", + "columns": [ + { + "value": "host_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_rows_by_speaker_participant_id", + "columns": [ + { + "value": "speaker_participant_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_transcripts", + "name": "meeting_transcripts_by_meeting_id", + "columns": [ + { + "value": "meeting_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_join_key", + "columns": [ + { + "value": "join_key", + "isExpression": false + } + ], + "isUnique": false, + "where": "join_key IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_join_key_to_fill", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "join_url IS NOT NULL AND join_key IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_time", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"started_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_account_id_title_folded", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "title_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_title_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "title IS NOT NULL AND title_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_meeting_series_id", + "columns": [ + { + "value": "meeting_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_event_id", + "columns": [ + { + "value": "event_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_host_identity_id", + "columns": [ + { + "value": "host_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_observation_members", + "name": "member_observation_members_by_member_stay_id", + "columns": [ + { + "value": "member_stay_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_observation_members", + "name": "member_observation_members_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_observations", + "name": "member_observations_by_chat_id_observed_at_id", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "observed_at", + "isExpression": false + }, + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_stays", + "name": "member_stays_open", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "left_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_stays", + "name": "member_stays_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_stays", + "name": "member_stays_by_invited_by_identity_id", + "columns": [ + { + "value": "invited_by_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_subject_type_subject_id", + "columns": [ + { + "value": "subject_type", + "isExpression": false + }, + { + "value": "subject_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_supersedes_id", + "columns": [ + { + "value": "supersedes_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_kind_value", + "columns": [ + { + "value": "kind", + "isExpression": false + }, + { + "value": "value", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_domain", + "columns": [ + { + "value": "domain", + "isExpression": false + } + ], + "isUnique": false, + "where": "domain IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_status_kind", + "columns": [ + { + "value": "status", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_target_type_target_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "target_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_links", + "name": "message_links_unique", + "columns": [ + { + "value": "message_id", + "isExpression": false + }, + { + "value": "ifnull(\"parent_id\", 0)", + "isExpression": true + }, + { + "value": "source", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + }, + { + "value": "ifnull(\"build\", 0)", + "isExpression": true + } + ], + "isUnique": true, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_links", + "name": "message_links_by_build", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "build", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_links", + "name": "message_links_by_parent_id", + "columns": [ + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_reactions", + "name": "message_reactions_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_revisions", + "name": "message_revisions_by_message_id", + "columns": [ + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_transcripts", + "name": "message_transcripts_by_message_id", + "columns": [ + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_time", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "\"sent_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_starred_by_time", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "\"sent_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": "starred = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_reply", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "reply_to_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "reply_to_external_id IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_account", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_to_normalize", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "normalized_text IS NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_sender_identity_id", + "columns": [ + { + "value": "sender_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_thread_root_id", + "columns": [ + { + "value": "thread_root_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "note_revisions", + "name": "note_revisions_by_note_id", + "columns": [ + { + "value": "note_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "notes", + "name": "notes_by_notable_type_notable_id", + "columns": [ + { + "value": "notable_type", + "isExpression": false + }, + { + "value": "notable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "notes", + "name": "notes_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "order_lines", + "name": "order_lines_by_catalog_item_id", + "columns": [ + { + "value": "catalog_item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_customer_type_customer_id", + "columns": [ + { + "value": "customer_type", + "isExpression": false + }, + { + "value": "customer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_supplier_type_supplier_id", + "columns": [ + { + "value": "supplier_type", + "isExpression": false + }, + { + "value": "supplier_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_invoice_id", + "columns": [ + { + "value": "invoice_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_payment_id", + "columns": [ + { + "value": "payment_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_contract_id", + "columns": [ + { + "value": "contract_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_deal_id", + "columns": [ + { + "value": "deal_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "organization_identities", + "name": "organization_identities_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_by_invoice_id", + "columns": [ + { + "value": "invoice_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_payer_type_payer_id", + "columns": [ + { + "value": "payer_type", + "isExpression": false + }, + { + "value": "payer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_payee_type_payee_id", + "columns": [ + { + "value": "payee_type", + "isExpression": false + }, + { + "value": "payee_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_refund_of", + "columns": [ + { + "value": "refund_of", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_subscription_id", + "columns": [ + { + "value": "subscription_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "persons", + "name": "persons_by_kind", + "columns": [ + { + "value": "kind", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "persons", + "name": "persons_kind_to_work_out", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "kind IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_item_type_item_id", + "columns": [ + { + "value": "item_type", + "isExpression": false + }, + { + "value": "item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_pipeline_id", + "columns": [ + { + "value": "pipeline_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_from_stage_id", + "columns": [ + { + "value": "from_stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_to_stage_id", + "columns": [ + { + "value": "to_stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_by_pipeline_id_external_id", + "columns": [ + { + "value": "pipeline_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_by_pipeline_id_position", + "columns": [ + { + "value": "pipeline_id", + "isExpression": false + }, + { + "value": "position", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_by_base_stage_id", + "columns": [ + { + "value": "base_stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipelines", + "name": "pipelines_by_account_id_kind_external_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL AND external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipelines", + "name": "pipelines_by_name_folded_kind", + "columns": [ + { + "value": "name_folded", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "poll_votes", + "name": "poll_votes_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_name_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "name_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_owner_type_owner_id", + "columns": [ + { + "value": "owner_type", + "isExpression": false + }, + { + "value": "owner_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_status_created_at", + "columns": [ + { + "value": "status", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_target_type_target_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_proposed_by_type_proposed_by_id", + "columns": [ + { + "value": "proposed_by_type", + "isExpression": false + }, + { + "value": "proposed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_decided_by_type_decided_by_id", + "columns": [ + { + "value": "decided_by_type", + "isExpression": false + }, + { + "value": "decided_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "record_relations", + "name": "record_relations_by_target_type_target_external_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "record_relations", + "name": "record_relations_by_target_id", + "columns": [ + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "records", + "name": "records_by_account_id_batch_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "batch_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "records", + "name": "records_by_entity_type_entity_id", + "columns": [ + { + "value": "entity_type", + "isExpression": false + }, + { + "value": "entity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "reminders", + "name": "reminders_due", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "state", + "isExpression": false + }, + { + "value": "due_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "reminders", + "name": "reminders_by_task_id", + "columns": [ + { + "value": "task_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "searches", + "name": "searches_history", + "columns": [ + { + "value": "command", + "isExpression": false + }, + { + "value": "params", + "isExpression": false + } + ], + "isUnique": true, + "where": "name IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "searches", + "name": "searches_by_last_run", + "columns": [ + { + "value": "\"last_run_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_by_subscription_id_effective_from", + "columns": [ + { + "value": "subscription_id", + "isExpression": false + }, + { + "value": "effective_from", + "isExpression": false + } + ], + "isUnique": true, + "where": "review <> 'rejected'", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_supplier_type_supplier_id", + "columns": [ + { + "value": "supplier_type", + "isExpression": false + }, + { + "value": "supplier_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_customer_type_customer_id", + "columns": [ + { + "value": "customer_type", + "isExpression": false + }, + { + "value": "customer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_catalog_item_id", + "columns": [ + { + "value": "catalog_item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_contract_id", + "columns": [ + { + "value": "contract_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "syncs", + "name": "syncs_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_by_source_id", + "columns": [ + { + "value": "source_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_by_survivor_id", + "columns": [ + { + "value": "survivor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_by_actor_type_actor_id", + "columns": [ + { + "value": "actor_type", + "isExpression": false + }, + { + "value": "actor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_redirects", + "name": "tag_redirects_by_survivor_id", + "columns": [ + { + "value": "survivor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "taggings", + "name": "taggings_main_topic", + "columns": [ + { + "value": "taggable_type", + "isExpression": false + }, + { + "value": "taggable_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "main = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "taggings", + "name": "taggings_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_assignments", + "name": "task_assignments_by_assignee_type_assignee_id", + "columns": [ + { + "value": "assignee_type", + "isExpression": false + }, + { + "value": "assignee_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_events", + "name": "task_events_by_task_id", + "columns": [ + { + "value": "task_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_events", + "name": "task_events_by_actor_type_actor_id", + "columns": [ + { + "value": "actor_type", + "isExpression": false + }, + { + "value": "actor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_pairs", + "name": "task_pairs_by_decision_created_at", + "columns": [ + { + "value": "decision", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_pairs", + "name": "task_pairs_by_other_id", + "columns": [ + { + "value": "other_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_pairs", + "name": "task_pairs_by_decided_by_type_decided_by_id", + "columns": [ + { + "value": "decided_by_type", + "isExpression": false + }, + { + "value": "decided_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_title_folded", + "columns": [ + { + "value": "title_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_close_reason_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "close_reason IS NOT NULL AND close_reason_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_status", + "columns": [ + { + "value": "project_id", + "isExpression": false + }, + { + "value": "status", + "isExpression": false + }, + { + "value": "due_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_project_id_status_next_check_at", + "columns": [ + { + "value": "project_id", + "isExpression": false + }, + { + "value": "status", + "isExpression": false + }, + { + "value": "next_check_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_project_id_source_locator", + "columns": [ + { + "value": "project_id", + "isExpression": false + }, + { + "value": "source_locator", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_source_group", + "columns": [ + { + "value": "source_group", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_provider_external_id", + "columns": [ + { + "value": "provider", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_parent_id", + "columns": [ + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_closed_by_type_closed_by_id", + "columns": [ + { + "value": "closed_by_type", + "isExpression": false + }, + { + "value": "closed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_close_suggested_by_type_close_suggested_by_id", + "columns": [ + { + "value": "close_suggested_by_type", + "isExpression": false + }, + { + "value": "close_suggested_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "templates_history", + "name": "templates_history_by_key_channel_language_id", + "columns": [ + { + "value": "key", + "isExpression": false + }, + { + "value": "channel", + "isExpression": false + }, + { + "value": "language", + "isExpression": false + }, + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tracker_items", + "name": "tracker_items_by_account_id_kind_parent_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + }, + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "transaction_splits", + "name": "transaction_splits_by_category_folded", + "columns": [ + { + "value": "category_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "transaction_splits", + "name": "transaction_splits_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "account_identities", + "name": "fk_account_identities_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "account_identities", + "name": "fk_account_identities_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "accounts", + "name": "fk_accounts_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "aliases", + "name": "fk_aliases_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "bot_updates", + "name": "fk_bot_updates_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "bots", + "name": "fk_bots_owner_person_id_persons_id_fk", + "columns": [ + "owner_person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_calendar_id_calendars_id_fk", + "columns": [ + "calendar_id" + ], + "tableTo": "calendars", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_series_entry_id_calendar_entries_id_fk", + "columns": [ + "series_entry_id" + ], + "tableTo": "calendar_entries", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_event_id_events_id_fk", + "columns": [ + "event_id" + ], + "tableTo": "events", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_event_series_id_event_series_id_fk", + "columns": [ + "event_series_id" + ], + "tableTo": "event_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_organizer_identity_id_identities_id_fk", + "columns": [ + "organizer_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entry_participants", + "name": "fk_calendar_entry_participants_entry_id_calendar_entries_id_fk", + "columns": [ + "entry_id" + ], + "tableTo": "calendar_entries", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entry_participants", + "name": "fk_calendar_entry_participants_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entry_revisions", + "name": "fk_calendar_entry_revisions_entry_id_calendar_entries_id_fk", + "columns": [ + "entry_id" + ], + "tableTo": "calendar_entries", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendars", + "name": "fk_calendars_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "canonical_auto_tag_claims", + "name": "fk_auto_tag_claims_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "canonical_auto_tag_claims", + "name": "fk_auto_tag_claims_tag_id_tags_id_fk", + "columns": [ + "tag_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_event_people", + "name": "fk_chat_event_people_chat_event_id_chat_events_id_fk", + "columns": [ + "chat_event_id" + ], + "tableTo": "chat_events", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_event_people", + "name": "fk_chat_event_people_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_events", + "name": "fk_chat_events_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_events", + "name": "fk_chat_events_actor_identity_id_identities_id_fk", + "columns": [ + "actor_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_members", + "name": "fk_chat_members_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_members", + "name": "fk_chat_members_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chats", + "name": "fk_chats_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chats", + "name": "fk_chats_parent_chat_id_chats_id_fk", + "columns": [ + "parent_chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunk_messages", + "name": "fk_chunk_messages_chunk_id_chunks_id_fk", + "columns": [ + "chunk_id" + ], + "tableTo": "chunks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunk_messages", + "name": "fk_chunk_messages_first_message_id_messages_id_fk", + "columns": [ + "first_message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunk_messages", + "name": "fk_chunk_messages_last_message_id_messages_id_fk", + "columns": [ + "last_message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunks", + "name": "fk_chunks_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunks", + "name": "fk_chunks_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "contracts", + "name": "fk_contracts_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "contracts", + "name": "fk_contracts_deal_id_deals_id_fk", + "columns": [ + "deal_id" + ], + "tableTo": "deals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_messages", + "name": "fk_conversation_messages_conversation_id_conversations_id_fk", + "columns": [ + "conversation_id" + ], + "tableTo": "conversations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_messages", + "name": "fk_conversation_messages_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_readiness", + "name": "fk_conversation_readiness_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_state", + "name": "fk_conversation_state_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversations", + "name": "fk_conversations_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversations", + "name": "fk_conversations_first_message_id_messages_id_fk", + "columns": [ + "first_message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "crm_fields", + "name": "fk_crm_fields_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "crm_files", + "name": "fk_crm_files_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_stage_id_pipeline_stages_id_fk", + "columns": [ + "stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "decisions", + "name": "fk_decisions_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "decisions", + "name": "fk_decisions_supersedes_id_decisions_id_fk", + "columns": [ + "supersedes_id" + ], + "tableTo": "decisions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "document_revisions", + "name": "fk_document_revisions_document_id_documents_id_fk", + "columns": [ + "document_id" + ], + "tableTo": "documents", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "documents", + "name": "fk_documents_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_locations", + "name": "fk_email_locations_mailbox_id_mailboxes_id_fk", + "columns": [ + "mailbox_id" + ], + "tableTo": "mailboxes", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_locations", + "name": "fk_email_locations_email_id_emails_id_fk", + "columns": [ + "email_id" + ], + "tableTo": "emails", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_mailboxes", + "name": "fk_email_mailboxes_email_id_emails_id_fk", + "columns": [ + "email_id" + ], + "tableTo": "emails", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_mailboxes", + "name": "fk_email_mailboxes_mailbox_id_mailboxes_id_fk", + "columns": [ + "mailbox_id" + ], + "tableTo": "mailboxes", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_recipients", + "name": "fk_email_recipients_email_id_emails_id_fk", + "columns": [ + "email_id" + ], + "tableTo": "emails", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_recipients", + "name": "fk_email_recipients_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_threads", + "name": "fk_email_threads_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "emails", + "name": "fk_emails_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "emails", + "name": "fk_emails_email_thread_id_email_threads_id_fk", + "columns": [ + "email_thread_id" + ], + "tableTo": "email_threads", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "emails", + "name": "fk_emails_from_identity_id_identities_id_fk", + "columns": [ + "from_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "events", + "name": "fk_events_event_series_id_event_series_id_fk", + "columns": [ + "event_series_id" + ], + "tableTo": "event_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "facts", + "name": "fk_facts_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "facts", + "name": "fk_facts_supersedes_id_facts_id_fk", + "columns": [ + "supersedes_id" + ], + "tableTo": "facts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "fetch_leases", + "name": "fk_fetch_leases_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "files", + "name": "fk_files_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "files", + "name": "fk_files_parent_id_files_id_fk", + "columns": [ + "parent_id" + ], + "tableTo": "files", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "files", + "name": "fk_files_document_id_documents_id_fk", + "columns": [ + "document_id" + ], + "tableTo": "documents", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "financial_transactions", + "name": "fk_financial_transactions_financial_account_id_financial_accounts_id_fk", + "columns": [ + "financial_account_id" + ], + "tableTo": "financial_accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "financial_transactions", + "name": "fk_financial_transactions_payment_id_payments_id_fk", + "columns": [ + "payment_id" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "financial_transactions", + "name": "fk_financial_transactions_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_link_events", + "name": "fk_identity_link_events_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_link_events", + "name": "fk_identity_link_events_from_person_id_persons_id_fk", + "columns": [ + "from_person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_link_events", + "name": "fk_identity_link_events_to_person_id_persons_id_fk", + "columns": [ + "to_person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_links", + "name": "fk_identity_links_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_links", + "name": "fk_identity_links_person_id_persons_id_fk", + "columns": [ + "person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_revisions", + "name": "fk_identity_revisions_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoice_lines", + "name": "fk_invoice_lines_invoice_id_invoices_id_fk", + "columns": [ + "invoice_id" + ], + "tableTo": "invoices", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoice_lines", + "name": "fk_invoice_lines_catalog_item_id_catalog_items_id_fk", + "columns": [ + "catalog_item_id" + ], + "tableTo": "catalog_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoices", + "name": "fk_invoices_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoices", + "name": "fk_invoices_contract_id_contracts_id_fk", + "columns": [ + "contract_id" + ], + "tableTo": "contracts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoices", + "name": "fk_invoices_subscription_id_subscriptions_id_fk", + "columns": [ + "subscription_id" + ], + "tableTo": "subscriptions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_person_id_persons_id_fk", + "columns": [ + "person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_stage_id_pipeline_stages_id_fk", + "columns": [ + "stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_deal_id_deals_id_fk", + "columns": [ + "deal_id" + ], + "tableTo": "deals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "mail_rules", + "name": "fk_mail_rules_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "mailboxes", + "name": "fk_mailboxes_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_chat_messages", + "name": "fk_meeting_chat_messages_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_chat_messages", + "name": "fk_meeting_chat_messages_sender_participant_id_meeting_participants_id_fk", + "columns": [ + "sender_participant_id" + ], + "tableTo": "meeting_participants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_participants", + "name": "fk_meeting_participants_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_participants", + "name": "fk_meeting_participants_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_series", + "name": "fk_meeting_series_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_series", + "name": "fk_meeting_series_event_series_id_event_series_id_fk", + "columns": [ + "event_series_id" + ], + "tableTo": "event_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_series", + "name": "fk_meeting_series_host_identity_id_identities_id_fk", + "columns": [ + "host_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_summaries", + "name": "fk_meeting_summaries_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_transcript_rows", + "name": "fk_meeting_transcript_rows_meeting_transcript_id_meeting_transcripts_id_fk", + "columns": [ + "meeting_transcript_id" + ], + "tableTo": "meeting_transcripts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_transcript_rows", + "name": "fk_meeting_transcript_rows_speaker_participant_id_meeting_participants_id_fk", + "columns": [ + "speaker_participant_id" + ], + "tableTo": "meeting_participants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_transcripts", + "name": "fk_meeting_transcripts_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_meeting_series_id_meeting_series_id_fk", + "columns": [ + "meeting_series_id" + ], + "tableTo": "meeting_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_event_id_events_id_fk", + "columns": [ + "event_id" + ], + "tableTo": "events", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_host_identity_id_identities_id_fk", + "columns": [ + "host_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_counts", + "name": "fk_member_counts_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observation_members", + "name": "fk_member_observation_members_member_observation_id_member_observations_id_fk", + "columns": [ + "member_observation_id" + ], + "tableTo": "member_observations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observation_members", + "name": "fk_member_observation_members_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observation_members", + "name": "fk_member_observation_members_member_stay_id_member_stays_id_fk", + "columns": [ + "member_stay_id" + ], + "tableTo": "member_stays", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observations", + "name": "fk_member_observations_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_stays", + "name": "fk_member_stays_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_stays", + "name": "fk_member_stays_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_stays", + "name": "fk_member_stays_invited_by_identity_id_identities_id_fk", + "columns": [ + "invited_by_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "memories", + "name": "fk_memories_supersedes_id_memories_id_fk", + "columns": [ + "supersedes_id" + ], + "tableTo": "memories", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "memories", + "name": "fk_memories_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_counter_observations", + "name": "fk_message_counter_observations_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_links", + "name": "fk_message_links_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_links", + "name": "fk_message_links_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_links", + "name": "fk_message_links_parent_id_messages_id_fk", + "columns": [ + "parent_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_reactions", + "name": "fk_message_reactions_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_reactions", + "name": "fk_message_reactions_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_revisions", + "name": "fk_message_revisions_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_transcripts", + "name": "fk_message_transcripts_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_transcripts", + "name": "fk_message_transcripts_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_sender_identity_id_identities_id_fk", + "columns": [ + "sender_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_thread_root_id_messages_id_fk", + "columns": [ + "thread_root_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "note_revisions", + "name": "fk_note_revisions_note_id_notes_id_fk", + "columns": [ + "note_id" + ], + "tableTo": "notes", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "order_lines", + "name": "fk_order_lines_order_id_orders_id_fk", + "columns": [ + "order_id" + ], + "tableTo": "orders", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "order_lines", + "name": "fk_order_lines_catalog_item_id_catalog_items_id_fk", + "columns": [ + "catalog_item_id" + ], + "tableTo": "catalog_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_invoice_id_invoices_id_fk", + "columns": [ + "invoice_id" + ], + "tableTo": "invoices", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_payment_id_payments_id_fk", + "columns": [ + "payment_id" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_contract_id_contracts_id_fk", + "columns": [ + "contract_id" + ], + "tableTo": "contracts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_deal_id_deals_id_fk", + "columns": [ + "deal_id" + ], + "tableTo": "deals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "organization_identities", + "name": "fk_organization_identities_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "organization_identities", + "name": "fk_organization_identities_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payment_allocations", + "name": "fk_payment_allocations_payment_id_payments_id_fk", + "columns": [ + "payment_id" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payment_allocations", + "name": "fk_payment_allocations_invoice_id_invoices_id_fk", + "columns": [ + "invoice_id" + ], + "tableTo": "invoices", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payments", + "name": "fk_payments_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payments", + "name": "fk_payments_refund_of_payments_id_fk", + "columns": [ + "refund_of" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payments", + "name": "fk_payments_subscription_id_subscriptions_id_fk", + "columns": [ + "subscription_id" + ], + "tableTo": "subscriptions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stage_changes", + "name": "fk_pipeline_stage_changes_pipeline_id_pipelines_id_fk", + "columns": [ + "pipeline_id" + ], + "tableTo": "pipelines", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stage_changes", + "name": "fk_pipeline_stage_changes_from_stage_id_pipeline_stages_id_fk", + "columns": [ + "from_stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stage_changes", + "name": "fk_pipeline_stage_changes_to_stage_id_pipeline_stages_id_fk", + "columns": [ + "to_stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stages", + "name": "fk_pipeline_stages_pipeline_id_pipelines_id_fk", + "columns": [ + "pipeline_id" + ], + "tableTo": "pipelines", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stages", + "name": "fk_pipeline_stages_base_stage_id_pipeline_stages_id_fk", + "columns": [ + "base_stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipelines", + "name": "fk_pipelines_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "poll_votes", + "name": "fk_poll_votes_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "poll_votes", + "name": "fk_poll_votes_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "projects", + "name": "fk_projects_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "projects", + "name": "fk_projects_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "proposed_actions", + "name": "fk_proposed_actions_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "record_relations", + "name": "fk_record_relations_record_id_records_id_fk", + "columns": [ + "record_id" + ], + "tableTo": "records", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "record_relations", + "name": "fk_record_relations_target_id_records_id_fk", + "columns": [ + "target_id" + ], + "tableTo": "records", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "records", + "name": "fk_records_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "reminders", + "name": "fk_reminders_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "reminders", + "name": "fk_reminders_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscription_prices", + "name": "fk_subscription_prices_subscription_id_subscriptions_id_fk", + "columns": [ + "subscription_id" + ], + "tableTo": "subscriptions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscriptions", + "name": "fk_subscriptions_catalog_item_id_catalog_items_id_fk", + "columns": [ + "catalog_item_id" + ], + "tableTo": "catalog_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscriptions", + "name": "fk_subscriptions_contract_id_contracts_id_fk", + "columns": [ + "contract_id" + ], + "tableTo": "contracts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscriptions", + "name": "fk_subscriptions_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "sync_cursors", + "name": "fk_sync_cursors_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "sync_ranges", + "name": "fk_sync_ranges_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "syncs", + "name": "fk_syncs_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_consolidations", + "name": "fk_tag_consolidations_source_id_canonical_tags_id_fk", + "columns": [ + "source_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_consolidations", + "name": "fk_tag_consolidations_survivor_id_canonical_tags_id_fk", + "columns": [ + "survivor_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_redirects", + "name": "fk_tag_redirects_source_id_canonical_tags_id_fk", + "columns": [ + "source_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_redirects", + "name": "fk_tag_redirects_survivor_id_canonical_tags_id_fk", + "columns": [ + "survivor_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "taggings", + "name": "fk_taggings_tag_id_tags_id_fk", + "columns": [ + "tag_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_assignments", + "name": "fk_task_assignments_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_events", + "name": "fk_task_events_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_pairs", + "name": "fk_task_pairs_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_pairs", + "name": "fk_task_pairs_other_id_tasks_id_fk", + "columns": [ + "other_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tasks", + "name": "fk_tasks_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tasks", + "name": "fk_tasks_parent_id_tasks_id_fk", + "columns": [ + "parent_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tracker_items", + "name": "fk_tracker_items_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "transaction_splits", + "name": "fk_transaction_splits_transaction_id_financial_transactions_id_fk", + "columns": [ + "transaction_id" + ], + "tableTo": "financial_transactions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "transaction_splits", + "name": "fk_transaction_splits_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "account_identities", + "name": "account_identities_pk", + "columns": [ + "account_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "canonical_auto_tag_claims", + "name": "auto_tag_claims_pk", + "columns": [ + "chat_id", + "tag_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_event_people", + "name": "chat_event_people_pk", + "columns": [ + "chat_event_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_members", + "name": "chat_members_pk", + "columns": [ + "chat_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversation_messages", + "name": "conversation_messages_pk", + "columns": [ + "conversation_id", + "message_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversation_readiness", + "name": "conversation_readiness_pk", + "columns": [ + "chat_id", + "model" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_annotation_transfers", + "name": "document_annotation_transfers_pk", + "columns": [ + "source_key", + "collection" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_index_pending", + "name": "document_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_index_pending", + "name": "email_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_locations", + "name": "email_locations_pk", + "columns": [ + "mailbox_id", + "uidvalidity", + "uid" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_mailboxes", + "name": "email_mailboxes_pk", + "columns": [ + "email_id", + "mailbox_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "embeddings", + "name": "embeddings_pk", + "columns": [ + "model", + "content_hash" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "enrichments", + "name": "enrichments_pk", + "columns": [ + "subject_type", + "subject_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "event_index_pending", + "name": "event_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "fetch_leases", + "name": "fetch_leases_pk", + "columns": [ + "chat_id", + "anchor" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "involvement_pending", + "name": "involvement_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_index_pending", + "name": "meeting_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_counts", + "name": "member_counts_pk", + "columns": [ + "chat_id", + "date" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_observation_members", + "name": "member_observation_members_pk", + "columns": [ + "member_observation_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "memory_index_pending", + "name": "memory_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mention_pending", + "name": "mention_pending_pk", + "columns": [ + "source_type", + "source_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_counter_observations", + "name": "message_counter_observations_pk", + "columns": [ + "message_id", + "counter" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "note_index_pending", + "name": "note_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sync_cursors", + "name": "sync_cursors_pk", + "columns": [ + "account_id", + "key" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sync_ranges", + "name": "sync_ranges_pk", + "columns": [ + "chat_id", + "from_key" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "task_index_pending", + "name": "task_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "templates", + "name": "templates_pk", + "columns": [ + "key", + "channel", + "language" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "transcript_index_pending", + "name": "transcript_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "accounts", + "name": "accounts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "agent_actions", + "name": "agent_actions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "aliases", + "name": "aliases_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "attachments", + "name": "attachments_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "bot_updates", + "name": "bot_updates_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "bots", + "name": "bots_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendar_entry_participants", + "name": "calendar_entry_participants_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendar_entry_revisions", + "name": "calendar_entry_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendars", + "name": "calendars_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "canonical_tags", + "name": "tags_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "catalog_items", + "name": "catalog_items_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_events", + "name": "chat_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_revision_source", + "name": "chat_revision_source_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_revisions", + "name": "chat_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chats", + "name": "chats_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chunk_messages", + "name": "chunk_messages_pk", + "columns": [ + "chunk_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chunks", + "name": "chunks_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "contracts", + "name": "contracts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversation_state", + "name": "conversation_state_pk", + "columns": [ + "chat_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversations", + "name": "conversations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "crm_fields", + "name": "crm_fields_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "crm_files", + "name": "crm_files_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "deals", + "name": "deals_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "decision_requests", + "name": "decision_requests_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "decisions", + "name": "decisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_revisions", + "name": "document_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "documents", + "name": "documents_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_recipients", + "name": "email_recipients_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_threads", + "name": "email_threads_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "emails", + "name": "emails_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "entity_link_events", + "name": "entity_link_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "event_series", + "name": "event_series_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "events", + "name": "events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "fact_removals", + "name": "fact_removals_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "facts", + "name": "facts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "files", + "name": "files_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identities", + "name": "identities_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identity_links", + "name": "identity_links_pk", + "columns": [ + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identity_revisions", + "name": "identity_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "invoices", + "name": "invoices_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "involvements", + "name": "involvements_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "leads", + "name": "leads_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "link_reviews", + "name": "link_reviews_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "link_revisions", + "name": "link_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "links", + "name": "links_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mail_rules", + "name": "mail_rules_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mailboxes", + "name": "mailboxes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_series", + "name": "meeting_series_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_summaries", + "name": "meeting_summaries_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_rows_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_transcripts", + "name": "meeting_transcripts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meetings", + "name": "meetings_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_observations", + "name": "member_observations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_stays", + "name": "member_stays_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "memories", + "name": "memories_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mentions", + "name": "mentions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_links", + "name": "message_links_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_reactions", + "name": "message_reactions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_revisions", + "name": "message_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_stems_pending", + "name": "message_stems_pending_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_transcripts", + "name": "message_transcripts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "messages", + "name": "messages_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "note_revisions", + "name": "note_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "notes", + "name": "notes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "order_lines", + "name": "order_lines_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "orders", + "name": "orders_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "organization_identities", + "name": "organization_identities_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "organizations", + "name": "organizations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "payments", + "name": "payments_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "persons", + "name": "persons_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "pipelines", + "name": "pipelines_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "places", + "name": "places_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "poll_votes", + "name": "poll_votes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "projects", + "name": "projects_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "record_relations", + "name": "record_relations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "records", + "name": "records_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "reminders", + "name": "reminders_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "search_index_state", + "name": "search_index_state_pk", + "columns": [ + "name" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "searches", + "name": "searches_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "store_settings", + "name": "store_settings_pk", + "columns": [ + "key" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "subscriptions", + "name": "subscriptions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "syncs", + "name": "syncs_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "tag_redirects", + "name": "tag_redirects_pk", + "columns": [ + "source_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "taggings", + "name": "taggings_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "task_assignments", + "name": "task_assignments_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "task_events", + "name": "task_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "task_key_counters", + "name": "task_key_counters_pk", + "columns": [ + "prefix" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "task_pairs", + "name": "task_pairs_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "tasks", + "name": "tasks_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "templates_history", + "name": "templates_history_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "tracker_items", + "name": "tracker_items_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "transaction_splits", + "name": "transaction_splits_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "vector_indexes", + "name": "vector_indexes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "accounts", + "name": "accounts_provider_external_id_unique", + "columns": [ + "provider", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "attachments", + "name": "attachments_attachable_type_attachable_id_position_unique", + "columns": [ + "attachable_type", + "attachable_id", + "position" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "bot_updates", + "name": "bot_updates_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_calendar_id_external_id_unique", + "columns": [ + "calendar_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_series_entry_id_original_starts_at_unique", + "columns": [ + "series_entry_id", + "original_starts_at" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "calendar_entry_participants", + "name": "calendar_entry_participants_entry_id_email_unique", + "columns": [ + "entry_id", + "email" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "calendars", + "name": "calendars_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "chat_events", + "name": "chat_events_chat_id_source_id_unique", + "columns": [ + "chat_id", + "source_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "chats", + "name": "chats_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "chunks", + "name": "chunks_chunkable_type_chunkable_id_position_unique", + "columns": [ + "chunkable_type", + "chunkable_id", + "position" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "crm_fields", + "name": "crm_fields_account_id_kind_code_unique", + "columns": [ + "account_id", + "kind", + "code" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "crm_files", + "name": "crm_files_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "documents", + "name": "documents_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "email_threads", + "name": "email_threads_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "emails", + "name": "emails_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "files", + "name": "files_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "identities", + "name": "identities_provider_external_id_unique", + "columns": [ + "provider", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_invoice_id_position_unique", + "columns": [ + "invoice_id", + "position" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "link_reviews", + "name": "link_reviews_linkable_type_linkable_id_entity_type_unique", + "columns": [ + "linkable_type", + "linkable_id", + "entity_type" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "mail_rules", + "name": "mail_rules_account_id_conditions_unique", + "columns": [ + "account_id", + "conditions" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "mailboxes", + "name": "mailboxes_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_meeting_id_identity_id_unique", + "columns": [ + "meeting_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "meeting_series", + "name": "meeting_series_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "meeting_summaries", + "name": "meeting_summaries_meeting_id_source_unique", + "columns": [ + "meeting_id", + "source" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_rows_meeting_transcript_id_position_unique", + "columns": [ + "meeting_transcript_id", + "position" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "meetings", + "name": "meetings_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "mentions", + "name": "mentions_source_type_source_id_source_field_start_offset_kind_unique", + "columns": [ + "source_type", + "source_id", + "source_field", + "start_offset", + "kind" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "message_reactions", + "name": "message_reactions_chat_id_message_external_id_identity_id_unique", + "columns": [ + "chat_id", + "message_external_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "message_transcripts", + "name": "message_transcripts_chat_id_message_external_id_unique", + "columns": [ + "chat_id", + "message_external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "messages", + "name": "messages_chat_id_external_id_unique", + "columns": [ + "chat_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "order_lines", + "name": "order_lines_order_id_position_unique", + "columns": [ + "order_id", + "position" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "organization_identities", + "name": "organization_identities_identity_id_organization_id_unique", + "columns": [ + "identity_id", + "organization_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_payment_id_invoice_id_unique", + "columns": [ + "payment_id", + "invoice_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_pipeline_id_name_folded_unique", + "columns": [ + "pipeline_id", + "name_folded" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "poll_votes", + "name": "poll_votes_chat_id_message_external_id_identity_id_unique", + "columns": [ + "chat_id", + "message_external_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "record_relations", + "name": "record_relations_record_id_role_target_type_target_external_id_unique", + "columns": [ + "record_id", + "role", + "target_type", + "target_external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "records", + "name": "records_account_id_type_external_id_unique", + "columns": [ + "account_id", + "type", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "taggings", + "name": "taggings_tag_id_taggable_type_taggable_id_unique", + "columns": [ + "tag_id", + "taggable_type", + "taggable_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "task_assignments", + "name": "task_assignments_task_id_assignee_type_assignee_id_role_unique", + "columns": [ + "task_id", + "assignee_type", + "assignee_id", + "role" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "task_pairs", + "name": "task_pairs_task_id_other_id_unique", + "columns": [ + "task_id", + "other_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "tasks", + "name": "tasks_project_id_number_unique", + "columns": [ + "project_id", + "number" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "tracker_items", + "name": "tracker_items_account_id_kind_external_id_unique", + "columns": [ + "account_id", + "kind", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "transaction_splits", + "name": "transaction_splits_transaction_id_position_unique", + "columns": [ + "transaction_id", + "position" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "bots", + "name": "bots_name_unique", + "columns": [ + "name" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "canonical_tags", + "name": "tags_name_unique", + "columns": [ + "name" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "decision_requests", + "name": "decision_requests_token_digest_unique", + "columns": [ + "token_digest" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "places", + "name": "places_folded_unique", + "columns": [ + "folded" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "projects", + "name": "projects_key_unique", + "columns": [ + "key" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "searches", + "name": "searches_name_unique", + "columns": [ + "name" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_idempotency_key_unique", + "columns": [ + "idempotency_key" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "tasks", + "name": "tasks_key_unique", + "columns": [ + "key" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "tasks", + "name": "tasks_package_id_unique", + "columns": [ + "package_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "vector_indexes", + "name": "vector_indexes_model_unique", + "columns": [ + "model" + ], + "nameExplicit": false, + "entityType": "uniques" + } + ], + "renames": [] +} \ No newline at end of file diff --git a/package.json b/package.json index 7cdfb1ac3..51a30783f 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "type": "module", "wirecat": { "store": { - "speaks": 69, + "speaks": 70, "minCompatible": 56 } }, @@ -159,6 +159,14 @@ "types": "./dist/crm/testing/index.d.ts", "default": "./dist/crm/testing/index.js" }, + "./tracker": { + "types": "./dist/tracker/index.d.ts", + "default": "./dist/tracker/index.js" + }, + "./tracker/testing": { + "types": "./dist/tracker/testing/index.d.ts", + "default": "./dist/tracker/testing/index.js" + }, "./mail": { "types": "./dist/mail/index.d.ts", "default": "./dist/mail/index.js" diff --git a/scripts/schema/spec.mjs b/scripts/schema/spec.mjs index 96d3c3413..084243269 100644 --- a/scripts/schema/spec.mjs +++ b/scripts/schema/spec.mjs @@ -12,6 +12,7 @@ import { recordTables } from "./records.mjs" import { linkRevisionsTable, RELATIONSHIP_KEY, relationshipColumns } from "./relationships.mjs" import { tagConsolidationTables, taggingTable } from "./tag-consolidations.mjs" import { templateSection } from "./templates.mjs" +import { trackerTables } from "./tracker.mjs" const scratch = process.env.SCRATCH ?? new URL(".", import.meta.url).pathname const info = JSON.parse(readFileSync(`${scratch}/info.json`, "utf8")) @@ -1804,6 +1805,13 @@ const GROUPS = [ ], [...NEW.embeddings, ...conversationReadinessTables], ], + [ + "tracker", + "Issue trackers", + "What an issue tracker account holds, as last synced: teams, users, workflow states, labels, projects, issues and comments. A user joins a person only by exact e-mail, when read; nothing here writes to the people graph.", + [], + trackerTables, + ], ["store", "Store", "Bookkeeping for the file itself.", ["schema_migrations", "store_settings"], []], ] diff --git a/scripts/schema/tracker.mjs b/scripts/schema/tracker.mjs new file mode 100644 index 000000000..1ff37b0ae --- /dev/null +++ b/scripts/schema/tracker.mjs @@ -0,0 +1,36 @@ +import { c, fk, fts, id } from "./columns.mjs" + +export const trackerTables = [ + { + name: "tracker_items", + doc: "One team, user, workflow state, label, project, issue or comment of an issue tracker account (Linear), as last synced. The columns are what lists, filters and search read; the rest of the record is `data`.", + cols: [ + id(), + fk("account_id", "accounts", { notnull: true, note: "the tracker account it was copied from" }), + c("kind", "text", { notnull: true, note: "team, user, state, label, project, issue or comment" }), + c("external_id", "text", { notnull: true, note: "its id in the tracker" }), + c("parent_id", "text", { + note: "the tracker's id of what it hangs under: a comment's issue, an issue's, a state's or a label's team", + }), + c("title", "text", { notnull: true, note: "an issue's title, a comment's first line, anything else's name" }), + c("title_folded", "text", { notnull: true, note: "the title in one letter case" }), + c("body", "text", { note: "an issue's or a project's description, a comment's text" }), + c("normalized_text", "text", { notnull: true, note: "title and body normalized for the word index" }), + c("data", "text", { + notnull: true, + note: "JSON: the record in the tracker domain's field names; a field the tracker did not send keeps its stored value", + }), + c("source_created_at", "integer", { note: "when the tracker says it was made" }), + c("source_updated_at", "integer", { note: "when the tracker says it last changed" }), + c("archived_at", "integer", { note: "the tracker archived it; it still exists there" }), + c("deleted_at", "integer", { note: "the tracker no longer lists it; sync never hard-deletes" }), + c("synced_at", "integer", { notnull: true }), + ], + keys: ["UNIQUE (account_id, kind, external_id)", "INDEX (account_id, kind, parent_id)"], + }, + fts( + "tracker_item_words", + "Word index over a tracker item's title and text, rowid = `tracker_items.id`.", + "normalized_text", + ), +] diff --git a/src/cli/messenger/store-maintenance-command.ts b/src/cli/messenger/store-maintenance-command.ts index 6d1a79feb..2a48a1119 100644 --- a/src/cli/messenger/store-maintenance-command.ts +++ b/src/cli/messenger/store-maintenance-command.ts @@ -47,6 +47,7 @@ import { resetNoteIndex, resetSearchIndex, resetStems, + resetTrackerItemWords, rollBack, searchIndexState, stemmerCache, @@ -403,6 +404,7 @@ const inspect = (path: string) => ...(stems ? [["message_stems", indexIntegrity(database, "message_stems", 0)]] : []), ...(schema.version > 0 ? [["attachment_words", indexIntegrity(database, "attachment_words", 0)]] : []), ...(schema.version >= 68 ? [["crm_file_words", indexIntegrity(database, "crm_file_words", 0)]] : []), + ...(schema.version >= 70 ? [["tracker_item_words", indexIntegrity(database, "tracker_item_words", 0)]] : []), ]) const size = bytesOf(path) + bytesOf(`${path}-wal`) const { bavail, bsize } = statfsSync(dirname(path)) @@ -629,7 +631,7 @@ const reindexCommand = (owner: StoreOwner): Command => ) } resetSearchIndex(database) - const fileTexts = resetAttachmentWords(database) + resetCrmFileWords(database) + const fileTexts = resetAttachmentWords(database) + resetCrmFileWords(database) + resetTrackerItemWords(database) const words = buildWordIndex(database, (note) => renderer.note(note)) return { path, diff --git a/src/domain/tracker.ts b/src/domain/tracker.ts new file mode 100644 index 000000000..8b865ef42 --- /dev/null +++ b/src/domain/tracker.ts @@ -0,0 +1,132 @@ +/** + * What an issue tracker holds that the store copies (Linear, and any tracker after it): its teams, users, workflow + * states, labels, projects, issues and the comments on them. Teams, users, states and labels come before the + * projects and issues that name them. + */ +export const TRACKER_KINDS = ["team", "user", "state", "label", "project", "issue", "comment"] as const +export type TrackerKind = (typeof TRACKER_KINDS)[number] + +/** Where an issue in a state stands in its work, whatever the team named the state. */ +export const STATE_TYPES = ["triage", "backlog", "unstarted", "started", "completed", "canceled"] as const +export type StateType = (typeof STATE_TYPES)[number] + +/** + * Every record has the tracker's id. A field left out means the tracker did not say, and the store keeps what it + * held; `null` means the tracker said there is none. Times are epoch milliseconds. + */ +interface TrackerRecord { + externalId: string + createdAt?: number | null + updatedAt?: number | null + /** The tracker archived it: it still exists, and a read that asks for archived rows lists it. */ + archivedAt?: number | null +} + +export interface TrackerTeam extends TrackerRecord { + name: string + /** The short key an issue's key starts with: `ENG`. */ + key?: string | null +} + +export interface TrackerUser extends TrackerRecord { + name: string + /** How the store joins the user to a person it already knows: by this exact address. */ + email?: string | null + active?: boolean | null +} + +export interface TrackerState extends TrackerRecord { + name: string + type: StateType + team?: string | null + /** Any numbers; the order they give is the board's. */ + position?: number | null +} + +export interface TrackerLabel extends TrackerRecord { + name: string + team?: string | null +} + +export interface TrackerProject extends TrackerRecord { + name: string + description?: string | null + /** The tracker's own word for where the project stands: `planned`, `started`. */ + status?: string | null + /** A user's id. */ + lead?: string | null + teams?: string[] + /** `YYYY-MM-DD`. */ + targetDate?: string | null + url?: string | null +} + +export interface TrackerIssue extends TrackerRecord { + title: string + /** The readable key people say: `ENG-12`. */ + key?: string | null + description?: string | null + state?: string | null + team?: string | null + project?: string | null + /** Users' ids. */ + assignee?: string | null + creator?: string | null + labels?: string[] + /** The issue this one is a part of. */ + parent?: string | null + /** 0 is none, then 1 the most urgent: Linear's scale, which a tracker with another one maps onto. */ + priority?: number | null + /** `YYYY-MM-DD`. */ + dueDate?: string | null + completedAt?: number | null + canceledAt?: number | null + url?: string | null +} + +export interface TrackerComment extends TrackerRecord { + issue: string + body: string + /** A user's id; none when an integration wrote it. */ + author?: string | null + url?: string | null +} + +export interface TrackerRecords { + team: TrackerTeam + user: TrackerUser + state: TrackerState + label: TrackerLabel + project: TrackerProject + issue: TrackerIssue + comment: TrackerComment +} + +/** The record's title in lists and search: an issue's title, a comment's start, anything else's name. */ +export const trackerTitleOf = (kind: K, record: TrackerRecords[K]): string => + kind === "issue" + ? (record as TrackerIssue).title + : kind === "comment" + ? (record as TrackerComment).body.split("\n")[0]?.slice(0, 120) || "(comment)" + : (record as { name: string }).name + +/** The record's text that search reads beside its title: a description or a comment's body. */ +export const trackerBodyOf = (kind: K, record: TrackerRecords[K]): string | null | undefined => + kind === "comment" + ? (record as TrackerComment).body + : kind === "issue" || kind === "project" + ? (record as TrackerIssue | TrackerProject).description + : null + +/** The record its row hangs under: a comment's issue, a state's or a label's team. */ +export const trackerParentOf = ( + kind: K, + record: TrackerRecords[K], +): string | null | undefined => + kind === "comment" + ? (record as TrackerComment).issue + : kind === "state" || kind === "label" + ? (record as TrackerState).team + : kind === "issue" + ? (record as TrackerIssue).team + : null diff --git a/src/store/exports.ts b/src/store/exports.ts index 26a41b235..8264e0f7b 100644 --- a/src/store/exports.ts +++ b/src/store/exports.ts @@ -152,6 +152,15 @@ export { DEFAULT_FIRST_PASS_PER_CHAT, firstPassPerChatOf, savedFirstPassPerChat export { inboxKey } from "./sqlite/tasks.js" export { storedTemplateBodies, type TemplateAddress } from "./sqlite/templates.js" export { THREAD_COLUMNS } from "./sqlite/thread-columns.js" +export { + resetTrackerItemWords, + type TrackerFilter, + type TrackerHit, + type TrackerItem, + type TrackerPerson, + type TrackerSearch, + type TrackerStore, +} from "./sqlite/tracker.js" export { dropAllUnusedVectors, vectorIndexCounts } from "./sqlite/vector-index.js" export type { MatchPlace, ScoredHit } from "./sqlite/words.js" export type { TaskDetails } from "./sqlite/work-tasks.js" diff --git a/src/store/recover.ts b/src/store/recover.ts index 5566d4de6..14719a9b2 100644 --- a/src/store/recover.ts +++ b/src/store/recover.ts @@ -31,6 +31,7 @@ import { isDerivedTable } from "./sqlite/rollback-copy.js" import { fillSearchIndex, resetSearchIndex } from "./sqlite/search-index.js" import { stemmerCache } from "./sqlite/stems.js" import { fillStems, resetStems } from "./sqlite/stems-fill.js" +import { resetTrackerItemWords } from "./sqlite/tracker.js" import { fillVectorIndexes } from "./sqlite/vector-index.js" /** `contentless_delete`, which every word index uses, came in SQLite 3.43. */ @@ -430,6 +431,7 @@ const FILLERS: Record number) => vo }, attachment_words: (database) => void resetAttachmentWords(database), crm_file_words: (database) => void resetCrmFileWords(database), + tracker_item_words: (database) => void resetTrackerItemWords(database), attachment_name_words: (database) => // As migration 20 filled it: й and ё fold as the triggers fold them. database.exec( diff --git a/src/store/sqlite/account-purge.ts b/src/store/sqlite/account-purge.ts index c71f12fca..93a47270d 100644 --- a/src/store/sqlite/account-purge.ts +++ b/src/store/sqlite/account-purge.ts @@ -142,6 +142,7 @@ export const purgeAccount = (context: StoreContext, accountKey: number): void => purgeCrmCopies(database, accountKey) orm.run(sql`DELETE FROM crm_fields WHERE account_id = ${accountKey}`) orm.run(sql`DELETE FROM crm_files WHERE account_id = ${accountKey}`) + orm.run(sql`DELETE FROM tracker_items WHERE account_id = ${accountKey}`) // An entity made from a record is the owner's and stays; only what the source said goes. const recordsOf = sql`(SELECT id FROM records WHERE account_id = ${accountKey})` orm.run(sql`DELETE FROM record_relations WHERE record_id IN ${recordsOf} OR target_id IN ${recordsOf}`) diff --git a/src/store/sqlite/crm-files.ts b/src/store/sqlite/crm-files.ts index 6656a86bf..73ab2ad6b 100644 --- a/src/store/sqlite/crm-files.ts +++ b/src/store/sqlite/crm-files.ts @@ -106,7 +106,7 @@ const rowOf = (row: Record): Omit => ({ }) /** One FTS5 phrase per word, quoted so no word is read as syntax; a word may start a longer one unless `exact`. */ -const matchOf = (words: readonly string[], anyWord: boolean, exact: boolean): string | undefined => { +export const matchOf = (words: readonly string[], anyWord: boolean, exact: boolean): string | undefined => { const phrases = words .map((word) => normalize(word).trim()) .filter(Boolean) @@ -117,7 +117,7 @@ const matchOf = (words: readonly string[], anyWord: boolean, exact: boolean): st return phrases.length ? [...new Set(phrases)].join(anyWord ? " OR " : " AND ") : undefined } -const excerptOf = (body: string, words: readonly string[]): string => { +export const excerptOf = (body: string, words: readonly string[]): string => { const folded = fold(body) const at = words .map((word) => folded.indexOf(fold(word).trim())) diff --git a/src/store/sqlite/manifest.ts b/src/store/sqlite/manifest.ts index 1dd49c0d7..ae360e778 100644 --- a/src/store/sqlite/manifest.ts +++ b/src/store/sqlite/manifest.ts @@ -156,6 +156,8 @@ export const MANIFEST: ManifestEntry[] = [ { name: "20261116204204_version-68-crm-file-words", version: 68, minCompatible: 56 }, { name: "20261117015456_version-69-conversation-readiness", version: 69, minCompatible: 56 }, { name: "20261117015457_version-69-conversation-readiness-triggers", version: 69, minCompatible: 56 }, + { name: "20261117211410_version-70-tracker-items", version: 70, minCompatible: 56 }, + { name: "20261117211414_version-70-tracker-item-words", version: 70, minCompatible: 56 }, ] export const generatedMigrations = ( diff --git a/src/store/sqlite/migrations.generated.ts b/src/store/sqlite/migrations.generated.ts index 86823c5ae..16a3bb8fc 100644 --- a/src/store/sqlite/migrations.generated.ts +++ b/src/store/sqlite/migrations.generated.ts @@ -1381,5 +1381,21 @@ export const GENERATED: { name: string; statements: string[] }[] = [ "-- A chat whose every chunk text already has a vector cannot gain from a new one: (model, content_hash) is unique.\nCREATE TRIGGER conversation_readiness_embedding_ai AFTER INSERT ON embeddings BEGIN\n DELETE FROM conversation_readiness WHERE model = NEW.model AND embedded_count < chunks;\nEND;", "CREATE TRIGGER conversation_readiness_embedding_ad AFTER DELETE ON embeddings BEGIN\n DELETE FROM conversation_readiness WHERE model = OLD.model AND embedded_count > 0;\nEND;" ] + }, + { + "name": "20261117211410_version-70-tracker-items", + "statements": [ + "CREATE TABLE `tracker_items` (\n\t`id` integer PRIMARY KEY,\n\t`account_id` integer NOT NULL,\n\t`kind` text NOT NULL,\n\t`external_id` text NOT NULL,\n\t`parent_id` text,\n\t`title` text NOT NULL,\n\t`title_folded` text NOT NULL,\n\t`body` text,\n\t`normalized_text` text NOT NULL,\n\t`data` text NOT NULL,\n\t`source_created_at` integer,\n\t`source_updated_at` integer,\n\t`archived_at` integer,\n\t`deleted_at` integer,\n\t`synced_at` integer NOT NULL,\n\tCONSTRAINT `fk_tracker_items_account_id_accounts_id_fk` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`),\n\tCONSTRAINT `tracker_items_account_id_kind_external_id_unique` UNIQUE(`account_id`,`kind`,`external_id`)\n);", + "CREATE INDEX `tracker_items_by_account_id_kind_parent_id` ON `tracker_items` (`account_id`,`kind`,`parent_id`);" + ] + }, + { + "name": "20261117211414_version-70-tracker-item-words", + "statements": [ + "-- Words of a tracker item's title and text, rowid = tracker_items.id: issues, projects and comments found by any word.\nCREATE VIRTUAL TABLE tracker_item_words USING fts5(\n normalized_text,\n content = '', contentless_delete = 1,\n tokenize = 'unicode61 remove_diacritics 2', prefix = '3');", + "CREATE TRIGGER tracker_item_words_ai AFTER INSERT ON tracker_items WHEN new.normalized_text <> '' BEGIN\n INSERT INTO tracker_item_words (rowid, normalized_text) VALUES (new.id, new.normalized_text);\nEND;", + "CREATE TRIGGER tracker_item_words_au AFTER UPDATE OF normalized_text ON tracker_items\n WHEN old.normalized_text IS NOT new.normalized_text BEGIN\n DELETE FROM tracker_item_words WHERE rowid = old.id;\n INSERT INTO tracker_item_words (rowid, normalized_text)\n SELECT new.id, new.normalized_text WHERE new.normalized_text <> '';\nEND;", + "CREATE TRIGGER tracker_item_words_ad AFTER DELETE ON tracker_items BEGIN\n DELETE FROM tracker_item_words WHERE rowid = old.id;\nEND;" + ] } ] diff --git a/src/store/sqlite/schema.ts b/src/store/sqlite/schema.ts index 9af59286f..ce5ec8a35 100644 --- a/src/store/sqlite/schema.ts +++ b/src/store/sqlite/schema.ts @@ -2978,6 +2978,39 @@ export const conversationReadiness = sqliteTable( ], ) +/** + * One team, user, workflow state, label, project, issue or comment of an issue tracker account, as last synced. The + * columns are what lists, filters and search read; the rest of the record is `data`, JSON in the domain's field names. + */ +export const trackerItems = sqliteTable( + "tracker_items", + { + id: integer("id").primaryKey(), + accountId: integer("account_id") + .notNull() + .references(() => accounts.id), + kind: text("kind").notNull(), + externalId: text("external_id").notNull(), + /** A comment's issue, an issue's team, a state's or a label's team: the tracker's id. */ + parentId: text("parent_id"), + title: text("title").notNull(), + titleFolded: text("title_folded").notNull(), + body: text("body"), + normalizedText: text("normalized_text").notNull(), + data: text("data").notNull(), + sourceCreatedAt: integer("source_created_at"), + sourceUpdatedAt: integer("source_updated_at"), + archivedAt: integer("archived_at"), + /** The tracker no longer lists it. */ + deletedAt: integer("deleted_at"), + syncedAt: integer("synced_at").notNull(), + }, + (table) => [ + unique().on(table.accountId, table.kind, table.externalId), + index("tracker_items_by_account_id_kind_parent_id").on(table.accountId, table.kind, table.parentId), + ], +) + /** Settings of the store file itself, shared by every profile, tg and MAX — unlike a profile's config file. */ export const storeSettings = sqliteTable("store_settings", { key: text("key").primaryKey(), diff --git a/src/store/sqlite/tracker.ts b/src/store/sqlite/tracker.ts new file mode 100644 index 000000000..c667087b7 --- /dev/null +++ b/src/store/sqlite/tracker.ts @@ -0,0 +1,341 @@ +import { + type StateType, + type TrackerKind, + type TrackerRecords, + trackerBodyOf, + trackerParentOf, + trackerTitleOf, +} from "../../domain/tracker.js" +import type { CacheDatabase } from "../driver.js" +import { fold, normalize } from "../normalize.js" +import type { AccountKey } from "../types.js" +import { accountPk, findAccountPk } from "./accounts.js" +import { excerptOf, matchOf } from "./crm-files.js" +import type { StoreContext } from "./open.js" +import { write } from "./transaction.js" + +/** One stored tracker record with what the store keeps beside it. */ +export interface TrackerItem { + kind: K + record: TrackerRecords[K] + /** The tracker no longer lists it. */ + deletedAt: number | null + syncedAt: number +} + +/** What `list` narrows to; an issue filter names the tracker's ids, as the records hold them. */ +export interface TrackerFilter { + /** A comment's issue, an issue's, a state's or a label's team. */ + parent?: string + /** Issues only. */ + assignee?: string | null + project?: string + state?: string + /** Issues whose state is of one of these types. */ + stateTypes?: readonly StateType[] + label?: string + /** Archived rows too; absent, only the live ones. */ + archived?: boolean + limit?: number + offset?: number +} + +export interface TrackerHit { + account: AccountKey + item: TrackerItem + excerpt: string +} + +export interface TrackerSearch { + words: string[] + anyWord?: boolean + exact?: boolean + /** Absent: every tracker account's. */ + accounts?: AccountKey[] + kinds?: readonly TrackerKind[] + limit?: number +} + +/** A tracker user joined to a person the store knows by the same exact e-mail. */ +export interface TrackerPerson { + user: string + person: string + name: string | null +} + +export interface TrackerStore { + /** + * Upserts records of one kind; a field a record leaves out keeps its stored value, and a record listed again after + * the tracker stopped listing it comes back. Answers how many were written. + */ + save( + key: AccountKey, + kind: K, + records: readonly TrackerRecords[K][], + now: number, + ): Promise + /** + * After a complete list of the kind's ids: marks deleted every stored one the list lacks that has not been synced + * since `before`, so a row saved while the list was read is never taken for a deleted one. Answers how many. + */ + removeUnlisted( + key: AccountKey, + kind: TrackerKind, + listed: readonly string[], + before: number, + now: number, + ): Promise + get(key: AccountKey, kind: K, externalId: string): Promise | undefined> + /** An issue by its readable key (`ENG-12`), in any letter case. */ + issueByKey(key: AccountKey, issueKey: string): Promise | undefined> + /** Live rows of a kind, newest change first; deleted ones never. */ + list( + key: AccountKey, + kind: K, + filter?: TrackerFilter, + ): Promise<{ items: TrackerItem[]; hasMore: boolean }> + find(search: TrackerSearch): Promise<{ items: TrackerHit[]; hasMore: boolean }> + /** Live rows of the kind, archived ones included. */ + count(key: AccountKey, kind: TrackerKind): Promise + /** The tracker users among `users` whose exact e-mail an identity linked to a person has. */ + people(key: AccountKey, users: readonly string[]): Promise +} + +const MOST = 500 + +type Row = Record + +const itemOf = (row: Row): TrackerItem => ({ + kind: String(row.kind) as K, + record: JSON.parse(String(row.data)) as TrackerRecords[K], + deletedAt: row.deleted_at == null ? null : Number(row.deleted_at), + syncedAt: Number(row.synced_at), +}) + +const COLUMNS = "t.kind, t.data, t.deleted_at, t.synced_at" + +const definedOnly = (record: object): Record => + Object.fromEntries(Object.entries(record).filter(([, value]) => value !== undefined)) + +/** `store rebuild`: the normalized copies follow the current normalizer, then the word index is filled again. */ +export const resetTrackerItemWords = (database: CacheDatabase): number => { + if (!database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'tracker_item_words'").get()) return 0 + return write(database, () => { + const update = database.prepare("UPDATE tracker_items SET normalized_text = ? WHERE id = ?") + for (const row of database.prepare("SELECT id, title, body, normalized_text FROM tracker_items").all()) { + const normalized = normalize([row.title, row.body].filter(Boolean).join("\n")) + if (normalized !== row.normalized_text) update.run(normalized, Number(row.id)) + } + database.exec("INSERT INTO tracker_item_words (tracker_item_words) VALUES ('delete-all')") + const { changes } = database + .prepare( + "INSERT INTO tracker_item_words (rowid, normalized_text) SELECT id, normalized_text FROM tracker_items " + + "WHERE normalized_text <> ''", + ) + .run() + return Number(changes) + }) +} + +const ISSUE_FIELDS = { assignee: "assignee", project: "project", state: "state" } as const + +export const trackerStoreOver = (context: StoreContext): TrackerStore => { + const { database } = context + + const save = (key: AccountKey, kind: K, records: readonly TrackerRecords[K][], now: number) => + write(database, () => { + const accountId = accountPk(context, key) + const stored = database.prepare( + "SELECT data FROM tracker_items WHERE account_id = ? AND kind = ? AND external_id = ?", + ) + const upsert = database.prepare( + "INSERT INTO tracker_items (account_id, kind, external_id, parent_id, title, title_folded, body, " + + "normalized_text, data, source_created_at, source_updated_at, archived_at, deleted_at, synced_at) " + + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NULL, ?) " + + "ON CONFLICT (account_id, kind, external_id) DO UPDATE SET parent_id = excluded.parent_id, " + + "title = excluded.title, title_folded = excluded.title_folded, body = excluded.body, " + + "normalized_text = excluded.normalized_text, data = excluded.data, " + + "source_created_at = excluded.source_created_at, source_updated_at = excluded.source_updated_at, " + + "archived_at = excluded.archived_at, deleted_at = NULL, synced_at = excluded.synced_at", + ) + for (const record of records) { + const before = stored.get(accountId, kind, record.externalId) + // A field the tracker left out of this read keeps what the store knew: a read never erases by omission. + const merged = { + ...(before ? (JSON.parse(String(before.data)) as object) : {}), + ...definedOnly(record), + } as unknown as TrackerRecords[K] + const title = trackerTitleOf(kind, merged) + const body = trackerBodyOf(kind, merged) ?? null + upsert.run( + accountId, + kind, + merged.externalId, + trackerParentOf(kind, merged) ?? null, + title, + fold(title), + body, + normalize([title, body].filter(Boolean).join("\n")), + JSON.stringify(merged), + merged.createdAt ?? null, + merged.updatedAt ?? null, + merged.archivedAt ?? null, + now, + ) + } + return records.length + }) + + const removeUnlisted = ( + key: AccountKey, + kind: TrackerKind, + listed: readonly string[], + before: number, + now: number, + ) => { + const accountId = findAccountPk(context, key) + if (accountId === undefined) return 0 + const keep = new Set(listed) + return write(database, () => { + const mark = database.prepare("UPDATE tracker_items SET deleted_at = ? WHERE id = ?") + let removed = 0 + for (const row of database + .prepare( + "SELECT id, external_id FROM tracker_items WHERE account_id = ? AND kind = ? AND deleted_at IS NULL " + + "AND synced_at < ?", + ) + .all(accountId, kind, before)) { + if (keep.has(String(row.external_id))) continue + mark.run(now, Number(row.id)) + removed += 1 + } + return removed + }) + } + + const list = (key: AccountKey, kind: K, filter: TrackerFilter = {}) => { + const accountId = findAccountPk(context, key) + if (accountId === undefined) return { items: [] as TrackerItem[], hasMore: false } + const limit = Math.min(Math.max(filter.limit ?? 100, 1), MOST) + const params: (string | number)[] = [accountId, kind] + let sql = `SELECT ${COLUMNS} FROM tracker_items t WHERE t.account_id = ? AND t.kind = ? AND t.deleted_at IS NULL` + if (!filter.archived) sql += " AND t.archived_at IS NULL" + if (filter.parent !== undefined) { + sql += " AND t.parent_id = ?" + params.push(filter.parent) + } + for (const [name, field] of Object.entries(ISSUE_FIELDS)) { + const value = filter[name as keyof typeof ISSUE_FIELDS] + if (value === undefined) continue + if (value === null) sql += ` AND json_extract(t.data, '$.${field}') IS NULL` + else { + sql += ` AND json_extract(t.data, '$.${field}') = ?` + params.push(value) + } + } + if (filter.label !== undefined) { + sql += " AND EXISTS (SELECT 1 FROM json_each(t.data, '$.labels') l WHERE l.value = ?)" + params.push(filter.label) + } + if (filter.stateTypes?.length) { + sql += + " AND EXISTS (SELECT 1 FROM tracker_items s WHERE s.account_id = t.account_id AND s.kind = 'state' " + + `AND s.external_id = json_extract(t.data, '$.state') AND json_extract(s.data, '$.type') IN (${filter.stateTypes + .map(() => "?") + .join(", ")}))` + for (const type of filter.stateTypes) params.push(type) + } + sql += " ORDER BY coalesce(t.source_updated_at, t.synced_at) DESC, t.id DESC LIMIT ? OFFSET ?" + params.push(limit + 1, filter.offset ?? 0) + const rows = database.prepare(sql).all(...params) + return { items: rows.slice(0, limit).map((row) => itemOf(row)), hasMore: rows.length > limit } + } + + const find = ({ words, anyWord = false, exact = false, accounts, kinds, limit }: TrackerSearch) => { + const match = matchOf(words, anyWord, exact) + if (!match) return { items: [], hasMore: false } + const most = Math.min(Math.max(limit ?? 100, 1), MOST) + const scoped = accounts?.map((one) => findAccountPk(context, one)).filter((one) => one !== undefined) ?? [] + if (accounts !== undefined && !scoped.length) return { items: [], hasMore: false } + const params: (string | number)[] = [match] + let sql = + `SELECT ${COLUMNS}, t.title, t.body, a.provider, a.external_id AS account FROM tracker_items t ` + + "JOIN accounts a ON a.id = t.account_id " + + "JOIN (SELECT rowid, rank FROM tracker_item_words WHERE tracker_item_words MATCH ?) w ON w.rowid = t.id " + + "WHERE t.deleted_at IS NULL" + if (accounts !== undefined) { + sql += ` AND t.account_id IN (${scoped.map(() => "?").join(", ")})` + for (const id of scoped) params.push(id) + } + if (kinds?.length) { + sql += ` AND t.kind IN (${kinds.map(() => "?").join(", ")})` + for (const kind of kinds) params.push(kind) + } + sql += " ORDER BY w.rank, t.source_updated_at DESC, t.id DESC LIMIT ?" + params.push(most + 1) + const rows = database.prepare(sql).all(...params) + return { + items: rows.slice(0, most).map( + (row): TrackerHit => ({ + account: { provider: String(row.provider), account: String(row.account) }, + item: itemOf(row), + excerpt: excerptOf([row.title, row.body].filter(Boolean).join("\n"), words), + }), + ), + hasMore: rows.length > most, + } + } + + return { + save: async (key, kind, records, now) => save(key, kind, records, now), + removeUnlisted: async (key, kind, listed, before, now) => removeUnlisted(key, kind, listed, before, now), + get: async (key: AccountKey, kind: K, externalId: string) => { + const accountId = findAccountPk(context, key) + if (accountId === undefined) return undefined + const row = database + .prepare(`SELECT ${COLUMNS} FROM tracker_items t WHERE t.account_id = ? AND t.kind = ? AND t.external_id = ?`) + .get(accountId, kind, externalId) + return row ? itemOf(row) : undefined + }, + issueByKey: async (key, issueKey) => { + const accountId = findAccountPk(context, key) + if (accountId === undefined) return undefined + const row = database + .prepare( + `SELECT ${COLUMNS} FROM tracker_items t WHERE t.account_id = ? AND t.kind = 'issue' ` + + "AND upper(json_extract(t.data, '$.key')) = upper(?) ORDER BY t.deleted_at IS NOT NULL LIMIT 1", + ) + .get(accountId, issueKey) + return row ? itemOf<"issue">(row) : undefined + }, + list: async (key, kind, filter) => list(key, kind, filter), + find: async (search) => find(search), + count: async (key, kind) => { + const accountId = findAccountPk(context, key) + if (accountId === undefined) return 0 + return Number( + database + .prepare("SELECT count(*) AS n FROM tracker_items WHERE account_id = ? AND kind = ? AND deleted_at IS NULL") + .get(accountId, kind)?.n ?? 0, + ) + }, + people: async (key, users) => { + const accountId = findAccountPk(context, key) + if (accountId === undefined || users.length === 0) return [] + return database + .prepare( + "SELECT u.external_id AS user, p.id AS person, p.name AS name FROM tracker_items u " + + "JOIN identities i ON i.email IS NOT NULL AND lower(i.email) = lower(json_extract(u.data, '$.email')) " + + "JOIN identity_links l ON l.identity_id = i.id JOIN persons p ON p.id = l.person_id " + + `WHERE u.account_id = ? AND u.kind = 'user' AND u.external_id IN (${users.map(() => "?").join(", ")}) ` + + "GROUP BY u.external_id ORDER BY u.external_id", + ) + .all(accountId, ...users) + .map((row) => ({ + user: String(row.user), + person: `person:${String(row.person)}`, + name: row.name == null ? null : String(row.name), + })) + }, + } +} diff --git a/src/store/store.ts b/src/store/store.ts index a6e26ca60..3cce2f5f0 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -73,6 +73,7 @@ import * as stems from "./sqlite/stems.js" import { type SubscriptionsStore, subscriptionsStoreOver } from "./sqlite/subscriptions.js" import { type StoreTaskStore, taskStoreOver } from "./sqlite/tasks.js" import { type TemplateStore, templateStoreOver } from "./sqlite/templates.js" +import { type TrackerStore, trackerStoreOver } from "./sqlite/tracker.js" import { type WalletsStore, walletsStoreOver } from "./sqlite/wallets.js" import { storeErrors } from "./store-errors.js" import { type SyncStore, syncStoreOver } from "./sync.js" @@ -163,6 +164,8 @@ export interface MessageStore { readonly crm: CrmCopies /** The CRM files the owner downloaded, with their text; only CRM code reads them, under the copy's viewer rule. */ readonly crmFiles: CrmFileStore + /** Issue trackers' copies: teams, users, states, labels, projects, issues and comments, as last synced. */ + readonly tracker: TrackerStore /** Relationships a source account reports, written as a diff that never overrides the owner's. */ readonly relations: RelationsStore /** The one-time keys behind the buttons of a message that asks the owner to decide a batch. */ @@ -295,6 +298,7 @@ const storeOver = (context: StoreContext): MessageStore => { const transactions = once(() => transactionsStoreOver(context)) const crm = once(() => crmCopiesOver(context, accountPeopleOver(context))) const crmFiles = once(() => crmFilesOver(context)) + const tracker = once(() => trackerStoreOver(context)) const relations = once(() => relationsStoreOver(context)) const decisionRequests = once(() => decisionRequestStoreOver(context)) const templates = once(() => templateStoreOver(context)) @@ -441,6 +445,9 @@ const storeOver = (context: StoreContext): MessageStore => { get crm() { return crm() }, + get tracker() { + return tracker() + }, get crmFiles() { return crmFiles() }, diff --git a/src/store/version-70.test.ts b/src/store/version-70.test.ts new file mode 100644 index 000000000..f7fbe66fc --- /dev/null +++ b/src/store/version-70.test.ts @@ -0,0 +1,47 @@ +import { mkdtempSync } from "node:fs" +import { tmpdir } from "node:os" +import { join } from "node:path" +import { expect, it } from "vitest" +import { rollBackTo } from "../testing/older-store.js" +import { openCache } from "./open.js" +import { resetTrackerItemWords } from "./sqlite/tracker.js" +import { openStore } from "./store.js" + +const WORKSPACE = { provider: "example-tracker", account: "workspace" } + +it("gives a version 69 file a place for tracker copies, with their words indexed", async () => { + const path = join(mkdtempSync(join(tmpdir(), "version-70-")), "wirecat.db") + const store = await openStore({ path }) + await store.close() + + const old = await openCache(path) + rollBackTo(old, 70) + expect(old.prepare("SELECT 1 FROM sqlite_master WHERE name = 'tracker_items'").get()).toBeUndefined() + old.close() + + const upgraded = await openStore({ path }) + try { + await upgraded.tracker.save( + WORKSPACE, + "issue", + [{ externalId: "i1", key: "ENG-1", title: "Refund the invoice" }], + 1, + ) + expect((await upgraded.tracker.find({ words: ["refund"] })).items).toHaveLength(1) + await upgraded.tracker.save(WORKSPACE, "issue", [{ externalId: "i1", title: "Close the ticket" }], 2) + expect((await upgraded.tracker.find({ words: ["refund"] })).items).toHaveLength(0) + expect((await upgraded.tracker.find({ words: ["ticket"] })).items).toHaveLength(1) + } finally { + await upgraded.close() + } + + const database = await openCache(path) + expect(resetTrackerItemWords(database)).toBe(1) + database.close() + const again = await openStore({ path }) + try { + expect((await again.tracker.find({ words: ["ticket"] })).items).toHaveLength(1) + } finally { + await again.close() + } +}) diff --git a/src/testing/older-store.ts b/src/testing/older-store.ts index a613d8663..ce0099d75 100644 --- a/src/testing/older-store.ts +++ b/src/testing/older-store.ts @@ -2,6 +2,7 @@ import type { CacheDatabase } from "../store/driver.js" // What a migration created that replaying it would create again; a migration that only updates rows needs nothing. const UNDO: Record = { + 70: "DROP TABLE tracker_item_words; DROP TABLE tracker_items;", 69: `${[ "message_ai", "message_au", diff --git a/src/tracker/cli/commands.test.ts b/src/tracker/cli/commands.test.ts new file mode 100644 index 000000000..47fdbe122 --- /dev/null +++ b/src/tracker/cli/commands.test.ts @@ -0,0 +1,86 @@ +import { mkdtempSync } from "node:fs" +import { tmpdir } from "node:os" +import { join } from "node:path" +import { Command } from "commander" +import { afterEach, describe, expect, it } from "vitest" +import { provide } from "../../cli/context.js" +import type { AppIdentity } from "../../ports/app.js" +import { type MessageStore, openStore } from "../../store/store.js" +import { exampleTrackerRows, fakeTrackerSource } from "../testing/index.js" +import { addTrackerCommands } from "./index.js" + +const APP: AppIdentity = { + command: "tracker", + appName: "example-tracker-cli", + envPrefix: "TRACKER", + description: "synthetic", + version: "1.0.0", +} +const ACCOUNT = { provider: "fake-tracker", account: "workspace" } +const NOW = Date.UTC(2026, 10, 17) + +const opened: MessageStore[] = [] +afterEach(async () => { + for (const store of opened.splice(0)) await store.close() +}) + +type Answer = Record & { items: Record[]; item: Record } + +const setup = async () => { + const store = await openStore({ path: join(mkdtempSync(join(tmpdir(), "tracker-cli-")), "store.db") }) + opened.push(store) + const source = fakeTrackerSource({ rows: exampleTrackerRows() }) + const cli = async (...args: string[]): Promise => { + let data = "" + const root = new Command("tracker") + .exitOverride() + .configureOutput({ writeErr: () => undefined, writeOut: () => undefined }) + .option("--json") + addTrackerCommands(root, { + app: APP, + open: async () => ({ account: ACCOUNT, store, source: () => source }), + now: () => NOW, + }) + provide(root, { streams: { data: (text: string) => (data += text), diagnostic: () => {} } } as never) + await root.parseAsync([...args, "--json"], { from: "user" }) + return JSON.parse(data) as Answer + } + return { cli, store } +} + +const ids = (answer: Answer) => answer.items.map((one) => one.external_id) + +describe("tracker commands", () => { + it("syncs, then lists, shows, searches and makes a task of an issue", async () => { + const { cli, store } = await setup() + expect((await cli("sync")).item).toMatchObject({ state: "complete", provider: "fake-tracker" }) + + expect(ids(await cli("issues", "list", "--type", "started", "--type", "unstarted"))).toEqual(["issue-2", "issue-1"]) + expect(ids(await cli("issues", "list", "--assignee", "none"))).toEqual(["issue-3"]) + const [first] = (await cli("issues", "list", "--label", "label-bug")).items + expect(first).toMatchObject({ + key: "ENG-1", + state_name: "In Progress", + state_type: "started", + assignee_name: "Ada Owner", + updated_at: expect.stringMatching(/^2026-11-01T/), + deleted: false, + }) + expect(first?.untrusted).toContain("title") + + const shown = (await cli("issues", "show", "eng-1")).item + expect((shown.comments as Record[]).map((one) => one.body)).toEqual(["Seen on three accounts"]) + + expect(ids(await cli("issues", "search", "provider")).sort()).toEqual(["issue-1", "project-1"]) + + const task = (await cli("issues", "task", "ENG-2", "--due", "2026-12-01")).item + expect(task).toMatchObject({ issue: "tracker:issue/issue-2", created: true }) + expect((await cli("issues", "task", "issue-2")).item).toMatchObject({ task_id: task.task_id, created: false }) + const [stored] = await store.tasks.query("fake-tracker:workspace", undefined, { limit: 10, offset: 0 }) + expect(stored).toMatchObject({ title: "ENG-2", task: { source: "tracker:issue/issue-2" } }) + expect(stored?.task).not.toHaveProperty("description") + + expect(ids(await cli("states", "list", "--limit", "10"))).toHaveLength(6) + expect(ids(await cli("projects", "list"))).toEqual(["project-1"]) + }) +}) diff --git a/src/tracker/cli/index.ts b/src/tracker/cli/index.ts new file mode 100644 index 000000000..74ac4e8fe --- /dev/null +++ b/src/tracker/cli/index.ts @@ -0,0 +1,389 @@ +import { annotate, sharedCommand } from "@wirecat/cli-base/commands" +import type { NextStep } from "@wirecat/cli-base/standards" +import { type Command, InvalidArgumentError } from "commander" +import * as v from "valibot" +import { answerEntity } from "../../cli/answer-entity.js" +import { environmentOf, inCommandRun, outputFor, runBudgetOf } from "../../cli/context.js" +import { honoursDryRun } from "../../cli/dry-run-guard.js" +import { FETCH, LOCAL_READ, LOCAL_WRITE, NO_EFFECTS } from "../../cli/effects.js" +import { type Body, itemOf, listOf, renderAnswer } from "../../cli/envelope.js" +import { + STATE_TYPES, + type StateType, + TRACKER_KINDS, + type TrackerKind, + type TrackerRecords, +} from "../../domain/tracker.js" +import { count, text } from "../../entities/fields.js" +import type { AppIdentity } from "../../ports/app.js" +import type { TrackerFilter, TrackerItem } from "../../store/sqlite/tracker.js" +import type { MessageStore } from "../../store/store.js" +import type { AccountKey } from "../../store/types.js" +import type { TrackerSource } from "../source.js" +import { syncTracker } from "../sync.js" +import { trackerIssueTask } from "../tasks.js" + +/** The selected profile's tracker account, opened for one command and closed before its answer is printed. */ +export interface TrackerRun { + account: AccountKey + store: MessageStore + /** The tracker, built on first use: a command that only reads the store never reads the sign-in. */ + source: () => TrackerSource + close?: () => Promise +} + +export interface TrackerCommandOptions { + /** The CLI itself: the first word of examples. */ + app: AppIdentity + /** Opens the selected profile for one command; `readOnly` when the command only reads the store. */ + open: (command: Command, access: { readOnly: boolean }) => Promise + now?: () => number +} + +const MOST = 500 + +const integer = (most: number) => (value: string) => { + const number = Number(value) + if (!Number.isSafeInteger(number) || number < 1 || number > most) + throw new InvalidArgumentError(`a whole number from 1 to ${most}`) + return number +} + +const day = (value: string) => { + if (!/^\d{4}-\d{2}-\d{2}$/.test(value) || Number.isNaN(Date.parse(value))) + throw new InvalidArgumentError("a day as YYYY-MM-DD") + return value +} + +const stateTypes = (value: string, previous: StateType[] = []) => { + if (!(STATE_TYPES as readonly string[]).includes(value)) + throw new InvalidArgumentError(`one of ${STATE_TYPES.join(", ")}`) + return [...previous, value as StateType] +} + +const TIMES = new Set(["createdAt", "updatedAt", "archivedAt", "completedAt", "canceledAt"]) + +const snake = (name: string) => name.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`) + +/** A tracker's text is someone else's: an agent reads these fields as data, never as instructions. */ +const UNTRUSTED: Record = { + team: ["name"], + user: ["name"], + state: ["name"], + label: ["name"], + project: ["name", "description", "status"], + issue: ["title", "description", "state_name", "labels_names"], + comment: ["body"], +} + +const viewOf = (item: TrackerItem, extra: Record = {}) => ({ + kind: item.kind, + ...Object.fromEntries( + Object.entries(item.record).map(([name, value]) => [ + snake(name), + TIMES.has(name) && typeof value === "number" ? new Date(value).toISOString() : value, + ]), + ), + ...extra, + deleted: item.deletedAt !== null, + untrusted: UNTRUSTED[item.kind], +}) + +const trackerView = v.looseObject({ kind: v.picklist(TRACKER_KINDS), external_id: text, deleted: v.boolean() }) + +const trackerSync = v.strictObject({ + provider: text, + account: text, + state: v.picklist(["partial", "complete"]), + complete: v.boolean(), + stopped: v.optional(v.picklist(["requests", "deadline", "cancelled"])), + synced: v.array( + v.strictObject({ + kind: v.picklist(TRACKER_KINDS), + round: v.picklist(["full", "changes"]), + reset: v.boolean(), + state: v.picklist(["partial", "complete"]), + saved: count, + unlisted: count, + pass: v.optional(v.picklist(["complete", "partial"])), + error: v.optional(text), + }), + ), + gaps: v.array(v.strictObject({ kind: v.picklist(TRACKER_KINDS), message: text, scope: v.optional(text) })), + progress: v.strictObject({ requests: count, saved: count, steps: count }), +}) + +const trackerTask = v.strictObject({ task_id: text, key: v.optional(text), issue: text, created: v.boolean() }) + +/** Each issue with its state's name and type, and its assignee's name and person, read from the same copy. */ +const withNames = async (run: TrackerRun, items: TrackerItem<"issue">[]) => { + const ids = (kind: "state" | "user", pick: (issue: TrackerRecords["issue"]) => string | null | undefined) => + [...new Set(items.map((one) => pick(one.record)).filter((one): one is string => typeof one === "string"))].map( + async (id) => [id, (await run.store.tracker.get(run.account, kind, id))?.record] as const, + ) + const states = new Map(await Promise.all(ids("state", (issue) => issue.state))) + const users = new Map(await Promise.all(ids("user", (issue) => issue.assignee))) + const people = new Map( + (await run.store.tracker.people(run.account, [...users.keys()])).map((one) => [one.user, one.person]), + ) + return items.map((item) => { + const state = item.record.state ? (states.get(item.record.state) as TrackerRecords["state"] | undefined) : undefined + const assignee = item.record.assignee + ? (users.get(item.record.assignee) as TrackerRecords["user"] | undefined) + : undefined + return viewOf(item, { + ...(state ? { state_name: state.name, state_type: state.type } : {}), + ...(assignee ? { assignee_name: assignee.name } : {}), + ...(item.record.assignee && people.has(item.record.assignee) + ? { assignee_person: people.get(item.record.assignee) } + : {}), + }) + }) +} + +const issueOf = async (run: TrackerRun, reference: string) => { + const found = + (await run.store.tracker.get(run.account, "issue", reference)) ?? + (await run.store.tracker.issueByKey(run.account, reference)) + if (!found) throw new InvalidArgumentError(`no issue ${reference} in the copy; run sync, then try again`) + return found +} + +const addTrackerCommandsDefinition = (program: Command, options: TrackerCommandOptions): void => { + const now = () => options.now?.() ?? Date.now() + const within = (command: Command, readOnly: boolean, work: (run: TrackerRun) => Promise) => + inCommandRun(command, async () => { + const run = await options.open(command, { readOnly }) + let body: Body + try { + body = await work(run) + } finally { + await run.close?.() + } + renderAnswer(command, outputFor(command), body) + }) + const example = (command: Command, ...lines: string[]) => + annotate(command, { examples: lines.map((line) => `${options.app.command} work ${line}`) }) + const paging = (command: Command) => + command + .option("--limit ", `rows per page, 1–${MOST}`, integer(MOST), 50) + .option("--page ", "which page, starting at 1", integer(1_000_000), 1) + + example( + answerEntity( + annotate(program.command("sync"), { effects: FETCH, offline: false, cooperative: true, partial: true }), + "tracker_sync", + trackerSync, + ).description( + "bring the tracker's copy in the local store up to date: teams, users, states, labels, projects, issues and " + + "comments that changed since the last sync, or everything with --rescan; once a day it also finds what the " + + "tracker deleted. A run stops before its deadline or --max-pages and the next one goes on from there", + ), + "sync", + "sync --rescan", + ) + .option("--rescan", "list everything again, every id too, dropping a round in progress") + .option("--max-pages ", "at most this many requests to the tracker in this run", integer(100_000)) + .action(async (opts: { maxPages?: number; rescan?: boolean }, command: Command) => { + const { signal } = environmentOf(command) + await within(command, false, async (run) => { + const report = await syncTracker(run.source(), run.store, run.account, { + now: now(), + budget: runBudgetOf(command, opts.maxPages), + ...(signal ? { signal } : {}), + ...(opts.rescan ? { rescan: true } : {}), + }) + const failed = report.synced.filter((one) => one.error !== undefined) + const next: NextStep[] | undefined = + report.state === "partial" && report.progress.steps > 0 + ? [ + { + kind: "command", + step: "tracker.sync", + command: "sync", + args: opts.maxPages === undefined ? {} : { max_pages: opts.maxPages }, + why: failed.length + ? "a kind failed to sync; running sync again retries it" + : "the sync stopped before its end; running it again goes on from there", + safe_to_auto_execute: true, + }, + ] + : undefined + const issues = failed.map((one) => ({ + code: "provider_error" as const, + reason: "sync.partial", + source: `tracker:${one.kind}`, + })) + return itemOf(report, { + ...(report.state === "partial" ? { meta: { complete: false, ...(issues.length ? { issues } : {}) } } : {}), + ...(next ? { next } : {}), + }) + }) + }) + + const issues = annotate(program.command("issues"), { effects: NO_EFFECTS }).description( + "the tracker's issues as last synced: state, team, project, assignee and labels", + ) + example( + paging( + answerEntity(annotate(issues.command("list"), { effects: LOCAL_READ }), "tracker_issue", trackerView) + .description("issues copied from the tracker, newest change first; run sync to bring them up to date") + .option("--team ", "only this team's issues") + .option("--project ", "only this project's issues") + .option("--assignee ", "only issues assigned to this user; `none` for unassigned ones") + .option("--state ", "only issues in this state") + .option( + "--type ", + `only issues whose state is of this type, repeatable: ${STATE_TYPES.join(", ")}`, + stateTypes, + ) + .option("--label ", "only issues with this label") + .option("--archived", "archived issues too"), + ), + "issues list --type started --type unstarted", + "issues list --assignee none --json", + ).action( + async ( + opts: { + team?: string + project?: string + assignee?: string + state?: string + type?: StateType[] + label?: string + archived?: boolean + limit: number + page: number + }, + command: Command, + ) => { + await within(command, true, async (run) => { + const filter: TrackerFilter = { + ...(opts.team ? { parent: opts.team } : {}), + ...(opts.project ? { project: opts.project } : {}), + ...(opts.assignee ? { assignee: opts.assignee === "none" ? null : opts.assignee } : {}), + ...(opts.state ? { state: opts.state } : {}), + ...(opts.type?.length ? { stateTypes: opts.type } : {}), + ...(opts.label ? { label: opts.label } : {}), + ...(opts.archived ? { archived: true } : {}), + limit: opts.limit, + offset: (opts.page - 1) * opts.limit, + } + const found = await run.store.tracker.list(run.account, "issue", filter) + return listOf("issues list", { + items: await withNames(run, found.items), + limit: opts.limit, + page: opts.page, + has_more: found.hasMore, + }) + }) + }, + ) + example( + answerEntity(annotate(issues.command("show"), { effects: LOCAL_READ }), "tracker_issue_detail", trackerView) + .description("one issue with its state, assignee and comments") + .argument("", "the issue's key (ENG-12) or id"), + "issues show ENG-12", + ).action(async (reference: string, _opts: unknown, command: Command) => { + await within(command, true, async (run) => { + const found = await issueOf(run, reference) + const [issue] = await withNames(run, [found]) + const comments = await run.store.tracker.list(run.account, "comment", { + parent: found.record.externalId, + limit: MOST, + }) + return itemOf({ ...issue, comments: comments.items.map((one) => viewOf(one)) }) + }) + }) + example( + paging( + answerEntity(annotate(issues.command("search"), { effects: LOCAL_READ }), "tracker_hit", trackerView) + .description("find issues, projects and comments in the copy by their words") + .argument("", "every word must match; prefixes of three letters or more match too") + .option("--any", "any word may match"), + ), + 'issues search "invoice currency"', + ).action(async (words: string[], opts: { any?: boolean; limit: number }, command: Command) => { + await within(command, true, async (run) => { + const found = await run.store.tracker.find({ + words, + accounts: [run.account], + kinds: ["issue", "project", "comment"], + limit: opts.limit, + ...(opts.any ? { anyWord: true } : {}), + }) + return listOf("issues search", { + items: found.items.map((hit) => viewOf(hit.item, { excerpt: hit.excerpt })), + limit: opts.limit, + has_more: found.hasMore, + args: { words }, + }) + }) + }) + example( + answerEntity(annotate(issues.command("task"), { effects: LOCAL_WRITE }), "tracker_issue_task", trackerTask) + .description( + "make an issue the owner's task: the task points at the issue and copies none of its text; the same issue " + + "again answers its existing task", + ) + .argument("", "the issue's key (ENG-12) or id") + .option("--due ", "when it is due, YYYY-MM-DD", day), + "issues task ENG-12 --due 2026-12-01", + ).action(async (reference: string, opts: { due?: string }, command: Command) => { + await within(command, false, async (run) => { + const { task, created } = await trackerIssueTask(run.store, run.account, reference, { + now: now(), + ...(opts.due ? { dueAt: new Date(`${opts.due}T00:00:00Z`) } : {}), + }) + return itemOf({ task_id: task.id, ...(task.key ? { key: task.key } : {}), issue: task.source, created }) + }) + }) + + for (const [kind, plural, what] of [ + ["project", "projects", "the tracker's projects: status, lead, teams and target date"], + ["team", "teams", "the tracker's teams"], + ["user", "users", "the tracker's users, each with the person the store knows by the same e-mail"], + ["state", "states", "each team's workflow states and their type"], + ["label", "labels", "the tracker's labels"], + ] as const) { + const group = annotate(program.command(plural), { effects: NO_EFFECTS }).description(what) + example( + paging( + answerEntity(annotate(group.command("list"), { effects: LOCAL_READ }), `tracker_${kind}`, trackerView) + .description(`${plural} copied from the tracker, newest change first`) + .option("--archived", `archived ${plural} too`), + ), + `${plural} list`, + ).action(async (opts: { archived?: boolean; limit: number; page: number }, command: Command) => { + await within(command, true, async (run) => { + const found = await run.store.tracker.list(run.account, kind, { + limit: opts.limit, + offset: (opts.page - 1) * opts.limit, + ...(opts.archived ? { archived: true } : {}), + }) + const people = + kind === "user" + ? new Map( + ( + await run.store.tracker.people( + run.account, + found.items.map((one) => one.record.externalId), + ) + ).map((one) => [one.user, one.person]), + ) + : new Map() + return listOf(`${plural} list`, { + items: found.items.map((one) => + viewOf(one, people.has(one.record.externalId) ? { person: people.get(one.record.externalId) } : {}), + ), + limit: opts.limit, + page: opts.page, + has_more: found.hasMore, + }) + }) + }) + } +} + +/** The tracker's commands: `sync`, `issues list|show|search|task`, and a `list` of each other kind. */ +export const addTrackerCommands = honoursDryRun(sharedCommand(addTrackerCommandsDefinition)) diff --git a/src/tracker/index.ts b/src/tracker/index.ts new file mode 100644 index 000000000..2025549ce --- /dev/null +++ b/src/tracker/index.ts @@ -0,0 +1,33 @@ +export { + STATE_TYPES, + type StateType, + TRACKER_KINDS, + type TrackerComment, + type TrackerIssue, + type TrackerKind, + type TrackerLabel, + type TrackerProject, + type TrackerRecords, + type TrackerState, + type TrackerTeam, + type TrackerUser, +} from "../domain/tracker.js" +export { addTrackerCommands, type TrackerCommandOptions, type TrackerRun } from "./cli/index.js" +export type { + TrackerCallContext, + TrackerChanges, + TrackerGap, + TrackerIdPage, + TrackerPage, + TrackerSource, + TrackerSourceTraits, +} from "./source.js" +export { + syncTracker, + type TrackerSyncOptions, + type TrackerSyncReport, + type TrackerSyncResult, + trackerCursorName, + trackerGapsOf, +} from "./sync.js" +export { TRACKER_ISSUE_TASK, trackerIssueSource, trackerIssueTask } from "./tasks.js" diff --git a/src/tracker/source.ts b/src/tracker/source.ts new file mode 100644 index 000000000..176cbed6d --- /dev/null +++ b/src/tracker/source.ts @@ -0,0 +1,63 @@ +import type { TrackerKind, TrackerRecords } from "../domain/tracker.js" + +export interface TrackerSourceTraits { + /** What this tracker has, in `TRACKER_KINDS` order: one without labels leaves `label` out. */ + kinds: readonly TrackerKind[] +} + +export interface TrackerPage { + items: T[] + /** More pages in this round, read from `nextCursor`. */ + hasMore: boolean + nextCursor?: string + /** On the last page: the cursor the next run reads changes after; `null` when the tracker keeps none. */ + cursor?: string | null +} + +/** `reset`: the cursor is dead, and the kind must be listed in full again. */ +export type TrackerChanges = TrackerPage | { reset: true } + +export interface TrackerIdPage { + items: string[] + hasMore: boolean + nextCursor?: string +} + +/** What the last sync could not read, so an answer can name it: a kind the sign-in's scope refused. */ +export interface TrackerGap { + kind: TrackerKind + message: string + scope?: string +} + +/** What the engine hands every source call; a source that ignores it works as before. */ +export interface TrackerCallContext { + /** Takes one request from the run's budget for each request beyond the first; throws once it is spent. */ + spend(): void + /** Says what the call could not read without failing it. */ + gap(gap: TrackerGap): void +} + +/** + * One tracker account, as an adapter reads it. Archived rows are listed, with `archivedAt`: the copy keeps them marked. + * A row the tracker deleted outright is found by `ids()`, a list of every id that exists, archived ones too. + */ +export interface TrackerSource { + /** The registry name: `linear`. */ + readonly provider: string + readonly traits: TrackerSourceTraits + /** The sign-in's own user id, which `mine` filters read; absent, the tracker cannot say. */ + self?(context?: TrackerCallContext): Promise + /** + * What changed since `cursor`, a page at a time; `cursor: null` lists everything. A tracker without a change feed + * reads by its own modified time, with an overlap, and gives that time back as the cursor. + */ + changes( + kind: K, + cursor: string | null, + page?: string, + context?: TrackerCallContext, + ): Promise> + /** Every id the tracker holds of the kind, archived ones too, a page at a time: how deletions are found. */ + ids(kind: TrackerKind, page?: string, context?: TrackerCallContext): Promise +} diff --git a/src/tracker/sync.ts b/src/tracker/sync.ts new file mode 100644 index 000000000..b61675640 --- /dev/null +++ b/src/tracker/sync.ts @@ -0,0 +1,295 @@ +import { CliError } from "@wirecat/cli-base" +import { type BudgetStop, type RunBudget, runBudget } from "../background/budget.js" +import { TRACKER_KINDS, type TrackerKind } from "../domain/tracker.js" +import type { MessageStore } from "../store/store.js" +import type { AccountKey } from "../store/types.js" +import type { TrackerCallContext, TrackerGap, TrackerSource } from "./source.js" + +const DAY = 86_400_000 + +/** Where a kind stands between runs: the cursor of its last finished round, and the round or id pass in progress. */ +interface TrackerCursor { + v: 1 + /** The tracker's cursor after the last finished round; `null` before the first. */ + token: string | null + /** A round that stopped before its last page: the next run goes on from `page` with the same `from`. */ + round: { from: string | null; page: string | null } | null + /** When the last complete id pass started; 0 before the first. */ + passAt: number +} + +/** An id pass in progress: the ids read so far, and the page to go on from. */ +interface TrackerPass { + v: 1 + started: number + page: string | null + ids: string[] +} + +const fresh = (): TrackerCursor => ({ v: 1, token: null, round: null, passAt: 0 }) + +const parsed = (value: string | null | undefined): T | null => { + try { + const found = JSON.parse(value ?? "null") as T | null + return found?.v === 1 ? found : null + } catch { + return null + } +} + +export const trackerCursorName = (kind: TrackerKind): string => `tracker:${kind}` +const passName = (kind: TrackerKind) => `tracker:${kind}:pass` +const GAPS = "tracker:gaps" +const RESUME = "tracker:resume" + +export interface TrackerSyncOptions { + now?: number + /** List everything again and every id, dropping a round in progress: `sync --rescan`. */ + rescan?: boolean + /** Asked before every request; without one the run goes until every kind is done. */ + budget?: RunBudget + signal?: AbortSignal + /** How long a complete id pass holds before the next one; a day when absent. */ + passEvery?: number +} + +export interface TrackerSyncResult { + kind: TrackerKind + /** `full`: everything was listed; `changes`: only what changed since the cursor. */ + round: "full" | "changes" + /** The cursor was dead, so the round became a full one. */ + reset: boolean + state: "partial" | "complete" + saved: number + /** Rows a complete id pass did not list, now marked deleted. */ + unlisted: number + /** `complete`: a full list of ids arrived; `partial`: it stopped and goes on next run. Absent: none was due. */ + pass?: "complete" | "partial" + /** Set when the kind failed; its cursor stays at its last saved page. */ + error?: string +} + +export interface TrackerSyncReport { + provider: string + account: string + synced: TrackerSyncResult[] + /** What the sign-in could not read, each once. */ + gaps: TrackerGap[] + /** Every kind finished its round and none failed. */ + complete: boolean + state: "partial" | "complete" + stopped?: BudgetStop + progress: { requests: number; saved: number; steps: number } +} + +/** Thrown by `TrackerCallContext.spend` when the budget is spent; the engine turns it into a `partial` stop. */ +class BudgetSpent extends Error { + constructor(readonly why: BudgetStop) { + super(`the run's budget is spent: ${why}`) + } +} + +interface Run { + source: TrackerSource + store: MessageStore + account: AccountKey + now: number + budget: RunBudget + signal?: AbortSignal + context: TrackerCallContext + report: TrackerSyncReport +} + +/** Reads one kind's changes from where it stood, page by page, saving each page and the cursor after it. */ +const syncChanges = async (run: Run, kind: TrackerKind, result: TrackerSyncResult, rescan: boolean) => { + const { source, store, account, budget } = run + const name = trackerCursorName(kind) + let cursor = parsed((await store.sync.syncState(account, name))?.value) ?? fresh() + let round = rescan ? { from: null, page: null } : (cursor.round ?? { from: cursor.token, page: null }) + const save = (patch: Partial) => { + cursor = { ...cursor, ...patch } + return store.sync.setSyncState(account, name, JSON.stringify(cursor)) + } + const pages = new Set() + for (;;) { + result.round = round.from === null ? "full" : "changes" + const why = budget.take() + if (why) { + await save({ round }) + return why + } + run.report.progress.requests += 1 + const page = await source.changes(kind, round.from, round.page ?? undefined, run.context) + if (run.signal?.aborted) { + await save({ round }) + return "cancelled" as const + } + if ("reset" in page) { + if (round.from === null) + throw new CliError("invalid_response", `${source.provider} refused a full list of ${kind}s`) + result.reset = true + round = { from: null, page: null } + pages.clear() + continue + } + if (page.items.length) { + result.saved += await store.tracker.save(account, kind, page.items, run.now) + run.report.progress.saved += page.items.length + } + run.report.progress.steps += 1 + if (!page.hasMore || page.nextCursor === undefined) { + await save({ token: page.cursor ?? null, round: null }) + return null + } + if (pages.has(page.nextCursor)) + throw new CliError("invalid_response", `${source.provider} gave the same page of ${kind}s twice`) + pages.add(page.nextCursor) + round = { ...round, page: page.nextCursor } + await save({ round }) + } +} + +/** + * Lists every id of the kind and marks deleted each stored row the list lacks. Archived rows are listed, so only a row + * the tracker deleted outright goes. A pass that stops keeps its ids and goes on next run. + */ +const passIds = async (run: Run, kind: TrackerKind, result: TrackerSyncResult, rescan: boolean) => { + const { source, store, account, budget } = run + const name = passName(kind) + const pending = rescan ? null : parsed((await store.sync.syncState(account, name))?.value) + let pass = pending ?? { + v: 1, + started: run.now, + page: null, + ids: [], + } + for (;;) { + const why = budget.take() + if (why) { + await store.sync.setSyncState(account, name, JSON.stringify(pass)) + result.pass = "partial" + return why + } + run.report.progress.requests += 1 + const page = await source.ids(kind, pass.page ?? undefined, run.context) + pass = { ...pass, ids: [...pass.ids, ...page.items] } + if (page.hasMore) { + // A pass that ended early would mark every unread row deleted. + if (page.nextCursor === undefined || page.nextCursor === pass.page) + throw new CliError("invalid_response", `${source.provider} gave no new page of ${kind} ids`) + pass = { ...pass, page: page.nextCursor } + await store.sync.setSyncState(account, name, JSON.stringify(pass)) + continue + } + result.unlisted += await store.tracker.removeUnlisted(account, kind, pass.ids, pass.started, run.now) + await store.sync.setSyncState(account, name, "null") + const cursor = + parsed((await store.sync.syncState(account, trackerCursorName(kind)))?.value) ?? fresh() + await store.sync.setSyncState(account, trackerCursorName(kind), JSON.stringify({ ...cursor, passAt: pass.started })) + result.pass = "complete" + return null + } +} + +const stopping = async (step: () => Promise): Promise => { + try { + return await step() + } catch (error) { + if (error instanceof BudgetSpent) return error.why + throw error + } +} + +/** + * Brings one tracker account's copy up to date: each kind's changes since its cursor, then, once a day, a pass over + * every id that marks deleted what the tracker no longer has. A run that hits its budget stops where it is, saved, + * and the next one goes on from there. A kind that fails is named and the others still sync. + */ +export const syncTracker = async ( + source: TrackerSource, + store: MessageStore, + account: AccountKey, + options: TrackerSyncOptions = {}, +): Promise => { + const now = options.now ?? Date.now() + const budget = options.budget ?? runBudget() + const passEvery = options.passEvery ?? DAY + const report: TrackerSyncReport = { + provider: source.provider, + account: account.account, + synced: [], + gaps: [], + complete: true, + state: "complete", + progress: { requests: 0, saved: 0, steps: 0 }, + } + const said = new Set() + const run: Run = { + source, + store, + account, + now, + budget, + ...(options.signal ? { signal: options.signal } : {}), + report, + context: { + spend: () => { + const why = budget.take() + if (why) throw new BudgetSpent(why) + report.progress.requests += 1 + }, + gap: (gap) => { + const key = `${gap.kind} ${gap.message}` + if (said.has(key)) return + said.add(key) + report.gaps.push(gap) + }, + }, + } + const kinds = TRACKER_KINDS.filter((one) => source.traits.kinds.includes(one)) + // A budget smaller than the kinds would spend itself re-reading the finished ones: a run that stopped leaves the kinds + // it finished, and the next one goes on with the rest. + const done = new Set( + options.rescan + ? [] + : (parsed<{ v: 1; done: TrackerKind[] }>((await store.sync.syncState(account, RESUME))?.value)?.done ?? []), + ) + for (const kind of kinds.filter((one) => !done.has(one))) { + const result: TrackerSyncResult = { kind, round: "full", reset: false, state: "partial", saved: 0, unlisted: 0 } + report.synced.push(result) + let stop: BudgetStop | null + try { + stop = await stopping(() => syncChanges(run, kind, result, options.rescan === true)) + const cursor = parsed((await store.sync.syncState(account, trackerCursorName(kind)))?.value) + const pending = parsed((await store.sync.syncState(account, passName(kind)))?.value) + const due = options.rescan === true || pending !== null || now - (cursor?.passAt ?? 0) >= passEvery + if (!stop && due) stop = await stopping(() => passIds(run, kind, result, options.rescan === true)) + } catch (error) { + result.error = error instanceof Error ? error.message : String(error) + report.complete = false + report.state = "partial" + continue + } + if (stop) { + report.stopped = stop + report.complete = false + report.state = "partial" + break + } + result.state = "complete" + done.add(kind) + } + await store.sync.setSyncState(account, RESUME, report.stopped ? JSON.stringify({ v: 1, done: [...done] }) : "null") + await store.sync.setSyncState(account, GAPS, JSON.stringify(report.gaps)) + return report +} + +/** The gaps the account's last sync recorded; none before its first. */ +export const trackerGapsOf = async (store: MessageStore, account: AccountKey): Promise => { + try { + const found = JSON.parse((await store.sync.syncState(account, GAPS))?.value ?? "[]") as unknown + return Array.isArray(found) ? (found as TrackerGap[]) : [] + } catch { + return [] + } +} diff --git a/src/tracker/tasks.ts b/src/tracker/tasks.ts new file mode 100644 index 000000000..bc04ceb68 --- /dev/null +++ b/src/tracker/tasks.ts @@ -0,0 +1,39 @@ +import { CliError } from "@wirecat/cli-base" +import { taskAccount } from "../services/task-rules.js" +import type { MessageStore } from "../store/store.js" +import type { AccountKey } from "../store/types.js" +import { createTaskService, type Task } from "../tasks/index.js" + +export const TRACKER_ISSUE_TASK = "tracker_issue" + +/** The task's locator: the issue in the tracker's copy, resolved when the task is read. */ +export const trackerIssueSource = (externalId: string): string => `tracker:issue/${externalId}` + +/** + * Makes an issue the owner's task: the task points at the issue and keeps only its readable key as a title, so the + * issue's text stays in the tracker's copy and a sync that changes it changes what the task shows. The same issue + * twice answers the task it already has. + */ +export const trackerIssueTask = async ( + store: MessageStore, + account: AccountKey, + issue: string, + { dueAt, now = Date.now() }: { dueAt?: Date; now?: number } = {}, +): Promise<{ task: Task; created: boolean }> => { + const found = (await store.tracker.get(account, "issue", issue)) ?? (await store.tracker.issueByKey(account, issue)) + if (!found || found.deletedAt !== null) + throw new CliError("not_found", `no issue ${issue} in the copy of ${account.provider}; run sync, then try again`) + const { externalId, key } = found.record + const { reviewDuplicates: _review, ...tasks } = store.tasks + const { task, created } = await createTaskService({ store: tasks, now: () => new Date(now) }).add({ + source: trackerIssueSource(externalId), + sourceKind: TRACKER_ISSUE_TASK, + account: taskAccount(account), + group: trackerIssueSource(externalId), + kind: "request", + origin: "owner", + title: key ?? externalId, + ...(dueAt ? { dueAt } : {}), + }) + return { task, created } +} diff --git a/src/tracker/testing/index.ts b/src/tracker/testing/index.ts new file mode 100644 index 000000000..c53f0c5da --- /dev/null +++ b/src/tracker/testing/index.ts @@ -0,0 +1,12 @@ +export { + exampleTrackerRows, + type FakeTrackerRows, + type FakeTrackerSource, + type FakeTrackerSourceOptions, + fakeTrackerSource, +} from "./source.js" +export { + type TrackerSourceFaults, + type TrackerSourceFixture, + trackerSourceContract, +} from "./source-contract.js" diff --git a/src/tracker/testing/source-contract.ts b/src/tracker/testing/source-contract.ts new file mode 100644 index 000000000..46cc0a67c --- /dev/null +++ b/src/tracker/testing/source-contract.ts @@ -0,0 +1,268 @@ +import assert from "node:assert/strict" +import { CliError } from "@wirecat/cli-base" +import { STATE_TYPES, type TrackerKind, type TrackerRecords } from "../../domain/tracker.js" +import type { ContractCase } from "../../meetings/index.js" +import type { TrackerCallContext, TrackerPage, TrackerSource } from "../source.js" + +/** Faults a case injects; each is opt-in, and a case whose hook is absent passes without running. */ +export interface TrackerSourceFaults { + /** A source over the same tracker whose own clock runs `ms` ahead of the tracker's, behind when negative. */ + skewed?(ms: number): TrackerSource | Promise + /** Changes one row on the tracker's side, for the next `changes()` to list. */ + change?(): { kind: TrackerKind; id: string } | Promise<{ kind: TrackerKind; id: string }> + /** Archives one row on the tracker's side: it stays, listed with `archivedAt`. */ + archive?(): { kind: TrackerKind; id: string } | Promise<{ kind: TrackerKind; id: string }> + /** Deletes one row on the tracker's side outright. */ + remove?(): { kind: TrackerKind; id: string } | Promise<{ kind: TrackerKind; id: string }> +} + +/** One adapter over recorded or faked answers, fresh for each case. Every kind its traits name lists at least one row. */ +export interface TrackerSourceFixture { + source: TrackerSource + /** The ids of every row of each kind, each changed before the overlap: a full list gives back each of them. */ + held?: Partial> + /** A cursor the tracker refuses; absent skips that case. */ + deadCursor?: { kind: TrackerKind; cursor: string } + faults?: TrackerSourceFaults +} + +/** Within any change feed's overlap: a computer's clock that is off by more is broken, not skewed. */ +const SKEW_MS = 10 * 60_000 +const MAX_PAGES = 1_000 +const DAY = /^\d{4}-\d{2}-\d{2}$/ + +const idsOf = (items: readonly unknown[]) => items.map((item) => (item as { externalId: string }).externalId) + +/** Every page of one kind from `cursor`, checking each page is new and the last one gives a cursor. */ +const listAll = async (source: TrackerSource, kind: K, cursor: string | null) => { + const items: TrackerRecords[K][] = [] + const pages = new Set() + let page: string | undefined + for (let read = 0; read < MAX_PAGES; read += 1) { + const answer = await source.changes(kind, cursor, page) + assert.ok(!("reset" in answer), `${kind}: a full list is never a dead cursor`) + const listed = answer as TrackerPage + assert.ok(Array.isArray(listed.items), `${kind}: a page has items`) + items.push(...listed.items) + assert.equal(listed.hasMore, listed.nextCursor !== undefined, `${kind}: a next cursor exactly when there is more`) + if (!listed.hasMore) { + assert.ok(listed.cursor === null || typeof listed.cursor === "string", `${kind}: the last page gives a cursor`) + return { items, cursor: listed.cursor ?? null } + } + const next = listed.nextCursor as string + assert.ok(!pages.has(next), `${kind}: the same page twice`) + pages.add(next) + page = next + } + throw new assert.AssertionError({ message: `${kind}: more than ${MAX_PAGES} pages` }) +} + +const allIds = async (source: TrackerSource, kind: TrackerKind) => { + const listed = new Set() + let page: string | undefined + for (let read = 0; read < MAX_PAGES; read += 1) { + const answer = await source.ids(kind, page) + for (const id of answer.items) listed.add(id) + if (!answer.hasMore) return listed + assert.ok(answer.nextCursor !== undefined && answer.nextCursor !== page, `${kind}: ids() gives a new page`) + page = answer.nextCursor + } + throw new assert.AssertionError({ message: `${kind}: more than ${MAX_PAGES} pages of ids` }) +} + +const optionalText = (value: unknown) => value === undefined || value === null || typeof value === "string" +const optionalTime = (value: unknown) => + value === undefined || value === null || (typeof value === "number" && Number.isSafeInteger(value)) + +/** The shape every record of the kind keeps, in the tracker domain's fields. */ +const checkShape = (kind: TrackerKind, record: Record) => { + const at = `${kind} ${String(record.externalId)}` + assert.ok(typeof record.externalId === "string" && record.externalId.trim(), `${kind}: a record has an id`) + for (const field of ["createdAt", "updatedAt", "archivedAt", "completedAt", "canceledAt"]) + assert.ok(optionalTime(record[field]), `${at}: ${field} is epoch ms or null`) + const named = kind === "issue" ? "title" : kind === "comment" ? "body" : "name" + assert.ok(typeof record[named] === "string", `${at} has its ${named}`) + if (kind === "state") + assert.ok((STATE_TYPES as readonly string[]).includes(String(record.type)), `${at}: type is one of ${STATE_TYPES}`) + if (kind === "comment") assert.ok(typeof record.issue === "string", `${at} names its issue`) + for (const field of ["team", "state", "project", "assignee", "creator", "lead", "author", "parent", "key", "email"]) + assert.ok(optionalText(record[field]), `${at}: ${field} is an id or text, or null`) + for (const field of ["labels", "teams"]) + if (record[field] !== undefined) + assert.ok( + Array.isArray(record[field]) && (record[field] as unknown[]).every((one) => typeof one === "string"), + `${at}: ${field} is a list of ids`, + ) + for (const field of ["dueDate", "targetDate"]) + if (record[field] !== undefined && record[field] !== null) + assert.match(String(record[field]), DAY, `${at}: ${field} is YYYY-MM-DD`) + if (record.priority !== undefined && record.priority !== null) + assert.ok(Number.isFinite(record.priority), `${at}: priority is a number`) +} + +/** What every tracker adapter answers, whatever the tracker: run each case in the adapter's tests. */ +export const trackerSourceContract = ( + make: () => TrackerSourceFixture | Promise, +): ContractCase[] => [ + { + name: "changes: a full list pages to its end, each record in the tracker domain's shape", + async run() { + const { source } = await make() + assert.ok(source.traits.kinds.length > 0, "the tracker names its kinds") + const listed = new Map>() + for (const kind of source.traits.kinds) { + const { items } = await listAll(source, kind, null) + assert.ok(items.length > 0, `${kind}: the fixture lists at least one`) + for (const item of items) checkShape(kind, item as unknown as Record) + const ids = idsOf(items) + assert.equal(new Set(ids).size, ids.length, `${kind}: no row twice in one full list`) + listed.set(kind, new Set(ids)) + } + // An issue's state and team, when both kinds are read, are rows the copy will hold. + for (const issue of listed.has("issue") ? (await listAll(source, "issue", null)).items : []) + for (const [field, kind] of [ + ["state", "state"], + ["team", "team"], + ] as const) { + const id = issue[field] + if (typeof id === "string" && listed.has(kind)) + assert.ok(listed.get(kind)?.has(id), `issue ${issue.externalId}: its ${field} ${id} is listed`) + } + }, + }, + { + name: "changes: a full list gives every row the fixture holds, none lost between the tracker's pages", + async run() { + const { source, held } = await make() + if (!held) return + for (const kind of source.traits.kinds) { + const ids: readonly string[] | undefined = held[kind] + if (!ids) continue + assert.deepEqual(idsOf((await listAll(source, kind, null)).items).sort(), [...ids].sort(), `${kind}: every row`) + } + }, + }, + { + name: "changes: the cursor a full list gave reads again without failing", + async run() { + const { source } = await make() + for (const kind of source.traits.kinds) { + const { cursor } = await listAll(source, kind, null) + if (cursor !== null) await listAll(source, kind, cursor) + } + }, + }, + { + name: "ids: a list of every id holds every row a full list gave", + async run() { + const { source } = await make() + for (const kind of source.traits.kinds) { + const listed = await allIds(source, kind) + for (const id of idsOf((await listAll(source, kind, null)).items)) + assert.ok(listed.has(id), `${kind} ${id} is missing from ids()`) + } + }, + }, + { + name: "changes: a dead cursor answers reset", + async run() { + const { source, deadCursor } = await make() + if (!deadCursor) return + const answer = await source.changes(deadCursor.kind, deadCursor.cursor) + assert.ok("reset" in answer, `${deadCursor.kind}: a cursor the tracker refuses answers reset`) + }, + }, + { + name: "faults: a clock off by ten minutes either way loses no change", + async run() { + for (const ms of [SKEW_MS, -SKEW_MS]) { + const { faults, held } = await make() + if (!faults?.skewed || !faults.change) return + const source = await faults.skewed(ms) + const cursors = new Map() + for (const kind of source.traits.kinds) cursors.set(kind, (await listAll(source, kind, null)).cursor) + const { kind, id } = await faults.change() + const cursor = cursors.get(kind) ?? null + assert.ok(cursor !== null, `${kind}: a full list gives a cursor for the change to be read after`) + const { items } = await listAll(source, kind, cursor) + assert.ok(idsOf(items).includes(id), `${kind} ${id} is in the changes with the clock ${ms / 60_000} min off`) + for (const one of held?.[kind]?.filter((other) => other !== id) ?? []) + assert.ok(!idsOf(items).includes(one), `${kind} ${one} did not change, yet a read of changes lists it`) + } + }, + }, + { + name: "faults: an archived row is still listed, in changes and ids, with its archive time", + async run() { + const { source, faults } = await make() + if (!faults?.archive) return + const cursors = new Map() + for (const kind of source.traits.kinds) cursors.set(kind, (await listAll(source, kind, null)).cursor) + const { kind, id } = await faults.archive() + const { items } = await listAll(source, kind, cursors.get(kind) ?? null) + const found = items.find((one) => one.externalId === id) + assert.ok(found, `${kind} ${id}: an archived row is in the changes`) + assert.ok(typeof found.archivedAt === "number", `${kind} ${id} carries archivedAt`) + assert.ok((await allIds(source, kind)).has(id), `${kind} ${id}: an archived row is still in ids()`) + }, + }, + { + name: "faults: a row deleted outright leaves ids()", + async run() { + const { source, faults } = await make() + if (!faults?.remove) return + const { kind, id } = await faults.remove() + assert.ok(!(await allIds(source, kind)).has(id), `${kind} ${id}: a deleted row is not in ids()`) + }, + }, + { + name: "faults: a full list cut after its first page goes on from that page in a new run, nothing lost or repeated", + async run() { + const { source, faults } = await make() + if (!faults) return + let cut = false + for (const kind of source.traits.kinds) { + const whole = idsOf((await listAll(source, kind, null)).items) + const first = (await source.changes(kind, null)) as TrackerPage + if (!first.hasMore) continue + cut = true + const { source: resumed } = await make() + const rest: unknown[] = [] + let page = first.nextCursor + for (let read = 0; page !== undefined && read < MAX_PAGES; read += 1) { + const answer = (await resumed.changes(kind, null, page)) as TrackerPage + rest.push(...answer.items) + page = answer.nextCursor + } + const joined = [...idsOf(first.items), ...idsOf(rest)] + assert.equal(new Set(joined).size, joined.length, `${kind}: no row twice across the cut`) + assert.deepEqual(joined.sort(), whole.sort(), `${kind}: the cut list adds up to the whole one`) + } + assert.ok(cut, "the fixture holds more than one page of some kind, so a list can be cut") + }, + }, + { + name: "faults: a call that pages inside stops when the run's budget is spent, and says so", + async run() { + const { source, faults } = await make() + if (!faults) return + const spent = new CliError("provider_error", "the run's budget is spent", { reason: "sync.partial" }) + for (const kind of source.traits.kinds) { + let asked = false + const context: TrackerCallContext = { + spend: () => { + asked = true + throw spent + }, + gap: () => {}, + } + const ended = await source.changes(kind, null, undefined, context).then( + () => undefined, + (error: unknown) => error, + ) + if (asked) assert.equal(ended, spent, `${kind}: a spent budget ends the call with its own error`) + else assert.equal(ended, undefined, `${kind}: a call that asks for no more requests is not stopped`) + } + }, + }, +] diff --git a/src/tracker/testing/source.ts b/src/tracker/testing/source.ts new file mode 100644 index 000000000..94389b965 --- /dev/null +++ b/src/tracker/testing/source.ts @@ -0,0 +1,171 @@ +import { CliError } from "@wirecat/cli-base" +import type { TrackerKind, TrackerRecords } from "../../domain/tracker.js" +import type { TrackerCallContext, TrackerChanges, TrackerIdPage, TrackerSource } from "../source.js" + +const OVERLAP_MS = 10 * 60_000 + +export type FakeTrackerRows = { [K in TrackerKind]?: TrackerRecords[K][] } + +export interface FakeTrackerSourceOptions { + rows: FakeTrackerRows + /** The tracker's own clock, which stamps `updatedAt`; this computer's is `skew` off it. */ + clock?: () => number + skew?: number + /** Rows on one page. */ + pageSize?: number + provider?: string +} + +export interface FakeTrackerSource extends TrackerSource { + /** Changes one row on the tracker's side: it gets a new `updatedAt`. */ + touch(kind: TrackerKind, externalId: string): void + archive(kind: TrackerKind, externalId: string): void + /** Deletes one row outright, as only an id pass finds. */ + remove(kind: TrackerKind, externalId: string): void + /** The same tracker, read from a computer whose clock is `ms` off. */ + skewed(ms: number): FakeTrackerSource +} + +/** + * A tracker in memory, read the way a GraphQL tracker is: changes by `updatedAt` from the cursor less an overlap, pages + * by offset, archived rows listed with their mark, deletions only by their absence from `ids()`. One call reads one + * page, so it never spends from the run's budget itself. + */ +export const fakeTrackerSource = (options: FakeTrackerSourceOptions): FakeTrackerSource => { + let tick = 0 + const clock = options.clock ?? (() => Date.UTC(2026, 10, 17) + tick++ * 1000) + const rows = options.rows + const size = options.pageSize ?? 2 + const listOf = (kind: K): TrackerRecords[K][] => (rows[kind] ?? []) as TrackerRecords[K][] + const find = (kind: TrackerKind, externalId: string) => { + const found = listOf(kind).find((one) => one.externalId === externalId) + if (!found) throw new Error(`the fake tracker has no ${kind} ${externalId}`) + return found + } + const make = (skew: number): FakeTrackerSource => ({ + provider: options.provider ?? "fake-tracker", + traits: { kinds: (Object.keys(rows) as TrackerKind[]).filter((kind) => listOf(kind).length > 0) }, + async changes( + kind: K, + cursor: string | null, + page?: string, + _context?: TrackerCallContext, + ): Promise> { + const since = cursor === null ? null : Date.parse(cursor) + if (since !== null && Number.isNaN(since)) return { reset: true } + const [offsetText, startedText] = (page ?? "").split("@") + const offset = page === undefined ? 0 : Number(offsetText) + const started = page === undefined ? clock() + skew : Number(startedText) + if (!Number.isSafeInteger(offset) || !Number.isSafeInteger(started)) + throw new CliError("validation_error", `not a page of the fake tracker: ${page}`) + const listed = listOf(kind) + .filter((one) => since === null || (one.updatedAt ?? 0) >= since - OVERLAP_MS) + .sort((a, b) => (a.updatedAt ?? 0) - (b.updatedAt ?? 0) || a.externalId.localeCompare(b.externalId)) + const items = listed.slice(offset, offset + size).map((one) => ({ ...one })) + const next = offset + size + return next < listed.length + ? { items, hasMore: true, nextCursor: `${next}@${started}` } + : { items, hasMore: false, cursor: new Date(started).toISOString() } + }, + async ids(kind: TrackerKind, page?: string, _context?: TrackerCallContext): Promise { + const offset = page === undefined ? 0 : Number(page) + const all = listOf(kind).map((one) => one.externalId) + const items = all.slice(offset, offset + size) + return offset + size < all.length + ? { items, hasMore: true, nextCursor: String(offset + size) } + : { items, hasMore: false } + }, + touch(kind, externalId) { + find(kind, externalId).updatedAt = clock() + }, + archive(kind, externalId) { + const found = find(kind, externalId) + found.archivedAt = clock() + found.updatedAt = found.archivedAt + }, + remove(kind, externalId) { + const list = rows[kind] as { externalId: string }[] | undefined + const at = list?.findIndex((one) => one.externalId === externalId) ?? -1 + if (at < 0) throw new Error(`the fake tracker has no ${kind} ${externalId}`) + list?.splice(at, 1) + }, + skewed: (ms) => make(ms), + }) + return make(options.skew ?? 0) +} + +const T0 = Date.UTC(2026, 10, 1) + +/** A small Linear-like workspace: one team, two users, the six state types, a label, a project, three issues. */ +export const exampleTrackerRows = (): Required => ({ + team: [{ externalId: "team-1", key: "ENG", name: "Engineering", updatedAt: T0 }], + user: [ + { externalId: "user-1", name: "Ada Owner", email: "ada@example.com", active: true, updatedAt: T0 }, + { externalId: "user-2", name: "Bob Builder", email: "bob@example.com", active: true, updatedAt: T0 + 1 }, + ], + state: [ + { externalId: "state-triage", name: "Triage", type: "triage", team: "team-1", position: 0, updatedAt: T0 }, + { externalId: "state-backlog", name: "Backlog", type: "backlog", team: "team-1", position: 1, updatedAt: T0 }, + { externalId: "state-todo", name: "Todo", type: "unstarted", team: "team-1", position: 2, updatedAt: T0 }, + { externalId: "state-doing", name: "In Progress", type: "started", team: "team-1", position: 3, updatedAt: T0 }, + { externalId: "state-done", name: "Done", type: "completed", team: "team-1", position: 4, updatedAt: T0 }, + { externalId: "state-gone", name: "Canceled", type: "canceled", team: "team-1", position: 5, updatedAt: T0 }, + ], + label: [{ externalId: "label-bug", name: "Bug", team: "team-1", updatedAt: T0 }], + project: [ + { + externalId: "project-1", + name: "Billing revamp", + description: "Move invoices to the new provider", + status: "started", + lead: "user-1", + teams: ["team-1"], + updatedAt: T0, + }, + ], + issue: [ + { + externalId: "issue-1", + key: "ENG-1", + title: "Invoices fail for EUR accounts", + description: "The provider refuses the currency code", + state: "state-doing", + team: "team-1", + project: "project-1", + assignee: "user-1", + labels: ["label-bug"], + priority: 1, + createdAt: T0, + updatedAt: T0 + 10, + }, + { + externalId: "issue-2", + key: "ENG-2", + title: "Write the migration guide", + state: "state-todo", + team: "team-1", + project: "project-1", + assignee: "user-2", + labels: [], + priority: 3, + createdAt: T0, + updatedAt: T0 + 20, + }, + { + externalId: "issue-3", + key: "ENG-3", + title: "Old spike", + state: "state-done", + team: "team-1", + assignee: null, + labels: [], + priority: 0, + createdAt: T0, + updatedAt: T0 + 30, + completedAt: T0 + 30, + }, + ], + comment: [ + { externalId: "comment-1", issue: "issue-1", body: "Seen on three accounts", author: "user-2", updatedAt: T0 + 11 }, + ], +}) diff --git a/src/tracker/tracker.test.ts b/src/tracker/tracker.test.ts new file mode 100644 index 000000000..d3b47f891 --- /dev/null +++ b/src/tracker/tracker.test.ts @@ -0,0 +1,168 @@ +import { mkdtempSync } from "node:fs" +import { tmpdir } from "node:os" +import { join } from "node:path" +import { afterEach, describe, expect, it } from "vitest" +import { runBudget } from "../background/budget.js" +import { type MessageStore, openStore } from "../store/store.js" +import { syncTracker } from "./sync.js" +import { trackerIssueTask } from "./tasks.js" +import { exampleTrackerRows, fakeTrackerSource, trackerSourceContract } from "./testing/index.js" + +const account = { provider: "fake-tracker", account: "workspace" } +const stores: MessageStore[] = [] +afterEach(async () => { + for (const store of stores.splice(0)) await store.close() +}) + +const storeOf = async () => { + const store = await openStore({ path: join(mkdtempSync(join(tmpdir(), "tracker-")), "store.db") }) + stores.push(store) + return store +} + +describe("fake tracker source", () => { + for (const c of trackerSourceContract(() => { + const rows = exampleTrackerRows() + const source = fakeTrackerSource({ rows }) + const held = Object.fromEntries( + Object.entries(rows).map(([kind, list]) => [kind, list.map((one) => one.externalId)]), + ) + return { + source, + held, + deadCursor: { kind: "issue", cursor: "not a time" }, + faults: { + skewed: (ms) => source.skewed(ms), + change: () => { + source.touch("issue", "issue-2") + return { kind: "issue", id: "issue-2" } + }, + archive: () => { + source.archive("issue", "issue-3") + return { kind: "issue", id: "issue-3" } + }, + remove: () => { + source.remove("issue", "issue-3") + return { kind: "issue", id: "issue-3" } + }, + }, + } + })) + it(c.name, c.run) +}) + +describe("syncTracker", () => { + it("copies every kind, then reads only changes, and finds archived and deleted rows", async () => { + const store = await storeOf() + const rows = exampleTrackerRows() + const source = fakeTrackerSource({ rows }) + const now = Date.UTC(2026, 10, 17) + + const first = await syncTracker(source, store, account, { now }) + expect(first.state).toBe("complete") + expect(first.synced.map((one) => [one.kind, one.round, one.pass])).toEqual( + ["team", "user", "state", "label", "project", "issue", "comment"].map((kind) => [kind, "full", "complete"]), + ) + expect(await store.tracker.count(account, "issue")).toBe(3) + + source.touch("issue", "issue-1") + source.archive("issue", "issue-2") + source.remove("issue", "issue-3") + const second = await syncTracker(source, store, account, { now: now + 60_000 }) + const issues = second.synced.find((one) => one.kind === "issue") + expect(issues).toMatchObject({ round: "changes", unlisted: 0 }) + expect(issues?.pass).toBeUndefined() + expect((await store.tracker.get(account, "issue", "issue-2"))?.record.archivedAt).toEqual(expect.any(Number)) + expect((await store.tracker.list(account, "issue")).items.map((one) => one.record.externalId)).toEqual([ + "issue-1", + "issue-3", + ]) + + const third = await syncTracker(source, store, account, { now: now + 2 * 86_400_000 }) + expect(third.synced.find((one) => one.kind === "issue")).toMatchObject({ pass: "complete", unlisted: 1 }) + expect((await store.tracker.get(account, "issue", "issue-3"))?.deletedAt).toEqual(expect.any(Number)) + expect((await store.tracker.list(account, "issue", { archived: true })).items).toHaveLength(2) + }) + + it("stops on its budget and goes on from the page it reached", async () => { + const store = await storeOf() + const source = fakeTrackerSource({ rows: exampleTrackerRows(), pageSize: 1 }) + const now = Date.UTC(2026, 10, 17) + const cut = await syncTracker(source, store, account, { now, budget: runBudget({ requests: 3 }) }) + expect(cut).toMatchObject({ state: "partial", stopped: "requests", complete: false }) + let rest = cut + for (let run = 0; run < 50 && rest.state === "partial"; run += 1) + rest = await syncTracker(source, store, account, { now, budget: runBudget({ requests: 3 }) }) + expect(rest.state).toBe("complete") + expect(await store.tracker.count(account, "state")).toBe(6) + expect(await store.tracker.count(account, "issue")).toBe(3) + }) + + it("names a kind that fails and still syncs the others", async () => { + const store = await storeOf() + const source = fakeTrackerSource({ rows: exampleTrackerRows() }) + const broken = { + ...source, + changes: (async (kind, cursor, page, context) => { + if (kind === "label") throw new Error("labels refused") + return source.changes(kind, cursor, page, context) + }) as typeof source.changes, + } + const report = await syncTracker(broken, store, account, { now: Date.UTC(2026, 10, 17) }) + expect(report.state).toBe("partial") + expect(report.synced.find((one) => one.kind === "label")?.error).toBe("labels refused") + expect(await store.tracker.count(account, "issue")).toBe(3) + }) +}) + +describe("store.tracker", () => { + it("filters issues by state type, assignee and label, and finds them by their words", async () => { + const store = await storeOf() + await syncTracker(fakeTrackerSource({ rows: exampleTrackerRows() }), store, account, { + now: Date.UTC(2026, 10, 17), + }) + const ids = async (filter: Parameters[2]) => + (await store.tracker.list(account, "issue", filter)).items.map((one) => one.record.externalId) + expect(await ids({ stateTypes: ["started", "unstarted"] })).toEqual(["issue-2", "issue-1"]) + expect(await ids({ assignee: null })).toEqual(["issue-3"]) + expect(await ids({ label: "label-bug" })).toEqual(["issue-1"]) + expect(await ids({ parent: "team-1", project: "project-1" })).toEqual(["issue-2", "issue-1"]) + expect((await store.tracker.issueByKey(account, "eng-2"))?.record.externalId).toBe("issue-2") + + const found = await store.tracker.find({ words: ["invoic"], accounts: [account] }) + expect(found.items.map((one) => one.item.record.externalId).sort()).toEqual(["issue-1", "project-1"]) + expect((await store.tracker.find({ words: ["accounts"], kinds: ["comment"] })).items).toHaveLength(1) + }) + + it("keeps a field a later read leaves out", async () => { + const store = await storeOf() + await store.tracker.save(account, "issue", [{ externalId: "i", title: "One", description: "kept" }], 1) + await store.tracker.save(account, "issue", [{ externalId: "i", title: "Two" }], 2) + expect((await store.tracker.get(account, "issue", "i"))?.record).toEqual({ + externalId: "i", + title: "Two", + description: "kept", + }) + }) +}) + +describe("trackerIssueTask", () => { + it("makes an issue the owner's task once, by its key, copying only the key", async () => { + const store = await storeOf() + await syncTracker(fakeTrackerSource({ rows: exampleTrackerRows() }), store, account, { + now: Date.UTC(2026, 10, 17), + }) + const first = await trackerIssueTask(store, account, "ENG-1") + expect(first.created).toBe(true) + expect(first.task).toMatchObject({ + source: "tracker:issue/issue-1", + sourceKind: "tracker_issue", + origin: "owner", + title: "ENG-1", + }) + expect(first.task.description).toBeUndefined() + const again = await trackerIssueTask(store, account, "issue-1") + expect(again).toMatchObject({ created: false, task: { id: first.task.id } }) + await expect(trackerIssueTask(store, account, "ENG-99")).rejects.toThrow(/no issue ENG-99/) + }) +}) From 37ae6cab813d1a0013e690e6025430d8f61023c4 Mon Sep 17 00:00:00 2001 From: leemour Date: Tue, 17 Nov 2026 22:42:57 +0100 Subject: [PATCH 2/2] fix(tracker): hold a mass id pass, fail a page with no next cursor, resume a stopped rescan From the review of the tracker module: - An id pass that would empty a kind, mark more than half of ten or more rows deleted, or follows a gap the sign-in reported, is held and marks nothing until sync --rescan (reason tracker.unlisted-held), as the CRM sync does. - A changes page that says there is more but gives no cursor fails the kind instead of ending the round. - A stopped --rescan goes on as a rescan in the next run; gaps of the kinds a resumed run skips are kept. - The id pass stops on cancel, keeping its ids. - issues search takes --page; issues show marks a cut comment list incomplete; a user joins a person only when one person has the e-mail. - tracker_item_words gets its vocab table, like every word index. Co-Authored-By: Claude Opus 5.5 --- docs/dev/TRACKER.md | 9 +- .../migration.sql | 1 + src/errors/reasons.ts | 4 + src/store/sqlite/migrations.generated.ts | 1 + src/store/sqlite/tracker.ts | 21 +++-- src/testing/older-store.ts | 2 +- src/tracker/cli/commands.test.ts | 4 + src/tracker/cli/index.ts | 35 ++++++-- src/tracker/source.ts | 4 +- src/tracker/sync.ts | 85 +++++++++++++++---- src/tracker/tracker.test.ts | 80 +++++++++++++++++ 11 files changed, 207 insertions(+), 39 deletions(-) diff --git a/docs/dev/TRACKER.md b/docs/dev/TRACKER.md index b2da66d22..fb4180a7b 100644 --- a/docs/dev/TRACKER.md +++ b/docs/dev/TRACKER.md @@ -37,8 +37,13 @@ stops keeps its ids and the page it reached. - **Budget.** The engine takes one request from `options.budget` before each call. A run that stops answers `state: "partial"` and `stopped`; the kinds it finished are skipped by the next run until every kind has had its round, so a budget smaller than the number of kinds still moves on. -- **Failures.** A kind that fails is named in its result's `error` and the others still sync. -- **`rescan`.** Lists everything again and every id, dropping a round in progress. +- **Held passes.** A pass is held (`pass: "held"`, with the reason in `held`) and marks nothing when the list is empty + while rows are stored, when it would mark more than half of ten or more stored rows deleted, or when the sign-in + reported a gap for the kind: a tracker that lost rights lists none of what it can no longer see. +- **Failures.** A kind that fails is named in its result's `error` and the others still sync. A page that says there is + more but gives no next page fails the kind. +- **`rescan`.** Lists everything again and every id, dropping a round in progress, and lets a held pass through. A + rescan that stops goes on as one in the next run. A save merges: a field the read left out keeps its stored value, so a partial selection never erases. diff --git a/drizzle/20261117211414_version-70-tracker-item-words/migration.sql b/drizzle/20261117211414_version-70-tracker-item-words/migration.sql index 8fb2ed9a8..b952ef2c8 100644 --- a/drizzle/20261117211414_version-70-tracker-item-words/migration.sql +++ b/drizzle/20261117211414_version-70-tracker-item-words/migration.sql @@ -3,6 +3,7 @@ CREATE VIRTUAL TABLE tracker_item_words USING fts5( normalized_text, content = '', contentless_delete = 1, tokenize = 'unicode61 remove_diacritics 2', prefix = '3');--> statement-breakpoint +CREATE VIRTUAL TABLE tracker_item_words_vocab USING fts5vocab(tracker_item_words, 'col');--> statement-breakpoint CREATE TRIGGER tracker_item_words_ai AFTER INSERT ON tracker_items WHEN new.normalized_text <> '' BEGIN INSERT INTO tracker_item_words (rowid, normalized_text) VALUES (new.id, new.normalized_text); END;--> statement-breakpoint diff --git a/src/errors/reasons.ts b/src/errors/reasons.ts index 9d73b3a30..6e16a9c0f 100644 --- a/src/errors/reasons.ts +++ b/src/errors/reasons.ts @@ -522,6 +522,10 @@ const OTHERS: Entry[] = [ validation("crm.owner-unknown", "owner: names no CRM user: me without a known sign-in user, or not a user id"), validation("crm.write-unsupported", "the CRM does not take this write, or does not recognise a repeated one"), validation("crm.unlisted-held", "a list of every id would mark most of a kind deleted; nothing was, until --rescan"), + validation( + "tracker.unlisted-held", + "a tracker's id list would mark too much deleted, or the sign-in read only part; nothing was, until --rescan", + ), validation( "crm.narrowing-held", "the default scope mine would mark most of a kind's stored rows deleted; none is, until the owner sets the scope", diff --git a/src/store/sqlite/migrations.generated.ts b/src/store/sqlite/migrations.generated.ts index 16a3bb8fc..bbae6bd01 100644 --- a/src/store/sqlite/migrations.generated.ts +++ b/src/store/sqlite/migrations.generated.ts @@ -1393,6 +1393,7 @@ export const GENERATED: { name: string; statements: string[] }[] = [ "name": "20261117211414_version-70-tracker-item-words", "statements": [ "-- Words of a tracker item's title and text, rowid = tracker_items.id: issues, projects and comments found by any word.\nCREATE VIRTUAL TABLE tracker_item_words USING fts5(\n normalized_text,\n content = '', contentless_delete = 1,\n tokenize = 'unicode61 remove_diacritics 2', prefix = '3');", + "CREATE VIRTUAL TABLE tracker_item_words_vocab USING fts5vocab(tracker_item_words, 'col');", "CREATE TRIGGER tracker_item_words_ai AFTER INSERT ON tracker_items WHEN new.normalized_text <> '' BEGIN\n INSERT INTO tracker_item_words (rowid, normalized_text) VALUES (new.id, new.normalized_text);\nEND;", "CREATE TRIGGER tracker_item_words_au AFTER UPDATE OF normalized_text ON tracker_items\n WHEN old.normalized_text IS NOT new.normalized_text BEGIN\n DELETE FROM tracker_item_words WHERE rowid = old.id;\n INSERT INTO tracker_item_words (rowid, normalized_text)\n SELECT new.id, new.normalized_text WHERE new.normalized_text <> '';\nEND;", "CREATE TRIGGER tracker_item_words_ad AFTER DELETE ON tracker_items BEGIN\n DELETE FROM tracker_item_words WHERE rowid = old.id;\nEND;" diff --git a/src/store/sqlite/tracker.ts b/src/store/sqlite/tracker.ts index c667087b7..844a02f2d 100644 --- a/src/store/sqlite/tracker.ts +++ b/src/store/sqlite/tracker.ts @@ -54,9 +54,10 @@ export interface TrackerSearch { accounts?: AccountKey[] kinds?: readonly TrackerKind[] limit?: number + offset?: number } -/** A tracker user joined to a person the store knows by the same exact e-mail. */ +/** A tracker user joined to the one person the store knows by the same e-mail. */ export interface TrackerPerson { user: string person: string @@ -84,6 +85,7 @@ export interface TrackerStore { listed: readonly string[], before: number, now: number, + options?: { dryRun?: boolean }, ): Promise get(key: AccountKey, kind: K, externalId: string): Promise | undefined> /** An issue by its readable key (`ENG-12`), in any letter case. */ @@ -97,7 +99,7 @@ export interface TrackerStore { find(search: TrackerSearch): Promise<{ items: TrackerHit[]; hasMore: boolean }> /** Live rows of the kind, archived ones included. */ count(key: AccountKey, kind: TrackerKind): Promise - /** The tracker users among `users` whose exact e-mail an identity linked to a person has. */ + /** The tracker users among `users` whose e-mail, in any letter case, an identity linked to one person has. */ people(key: AccountKey, users: readonly string[]): Promise } @@ -192,6 +194,7 @@ export const trackerStoreOver = (context: StoreContext): TrackerStore => { listed: readonly string[], before: number, now: number, + { dryRun = false }: { dryRun?: boolean } = {}, ) => { const accountId = findAccountPk(context, key) if (accountId === undefined) return 0 @@ -206,7 +209,7 @@ export const trackerStoreOver = (context: StoreContext): TrackerStore => { ) .all(accountId, kind, before)) { if (keep.has(String(row.external_id))) continue - mark.run(now, Number(row.id)) + if (!dryRun) mark.run(now, Number(row.id)) removed += 1 } return removed @@ -251,7 +254,7 @@ export const trackerStoreOver = (context: StoreContext): TrackerStore => { return { items: rows.slice(0, limit).map((row) => itemOf(row)), hasMore: rows.length > limit } } - const find = ({ words, anyWord = false, exact = false, accounts, kinds, limit }: TrackerSearch) => { + const find = ({ words, anyWord = false, exact = false, accounts, kinds, limit, offset = 0 }: TrackerSearch) => { const match = matchOf(words, anyWord, exact) if (!match) return { items: [], hasMore: false } const most = Math.min(Math.max(limit ?? 100, 1), MOST) @@ -271,8 +274,8 @@ export const trackerStoreOver = (context: StoreContext): TrackerStore => { sql += ` AND t.kind IN (${kinds.map(() => "?").join(", ")})` for (const kind of kinds) params.push(kind) } - sql += " ORDER BY w.rank, t.source_updated_at DESC, t.id DESC LIMIT ?" - params.push(most + 1) + sql += " ORDER BY w.rank, t.source_updated_at DESC, t.id DESC LIMIT ? OFFSET ?" + params.push(most + 1, offset) const rows = database.prepare(sql).all(...params) return { items: rows.slice(0, most).map( @@ -288,7 +291,8 @@ export const trackerStoreOver = (context: StoreContext): TrackerStore => { return { save: async (key, kind, records, now) => save(key, kind, records, now), - removeUnlisted: async (key, kind, listed, before, now) => removeUnlisted(key, kind, listed, before, now), + removeUnlisted: async (key, kind, listed, before, now, options) => + removeUnlisted(key, kind, listed, before, now, options), get: async (key: AccountKey, kind: K, externalId: string) => { const accountId = findAccountPk(context, key) if (accountId === undefined) return undefined @@ -328,7 +332,8 @@ export const trackerStoreOver = (context: StoreContext): TrackerStore => { "JOIN identities i ON i.email IS NOT NULL AND lower(i.email) = lower(json_extract(u.data, '$.email')) " + "JOIN identity_links l ON l.identity_id = i.id JOIN persons p ON p.id = l.person_id " + `WHERE u.account_id = ? AND u.kind = 'user' AND u.external_id IN (${users.map(() => "?").join(", ")}) ` + - "GROUP BY u.external_id ORDER BY u.external_id", + // Two persons behind one address say nothing about which one this user is. + "GROUP BY u.external_id HAVING count(DISTINCT p.id) = 1 ORDER BY u.external_id", ) .all(accountId, ...users) .map((row) => ({ diff --git a/src/testing/older-store.ts b/src/testing/older-store.ts index ce0099d75..c43d90a8d 100644 --- a/src/testing/older-store.ts +++ b/src/testing/older-store.ts @@ -2,7 +2,7 @@ import type { CacheDatabase } from "../store/driver.js" // What a migration created that replaying it would create again; a migration that only updates rows needs nothing. const UNDO: Record = { - 70: "DROP TABLE tracker_item_words; DROP TABLE tracker_items;", + 70: "DROP TABLE tracker_item_words_vocab; DROP TABLE tracker_item_words; DROP TABLE tracker_items;", 69: `${[ "message_ai", "message_au", diff --git a/src/tracker/cli/commands.test.ts b/src/tracker/cli/commands.test.ts index 47fdbe122..41c131a2d 100644 --- a/src/tracker/cli/commands.test.ts +++ b/src/tracker/cli/commands.test.ts @@ -72,6 +72,10 @@ describe("tracker commands", () => { expect((shown.comments as Record[]).map((one) => one.body)).toEqual(["Seen on three accounts"]) expect(ids(await cli("issues", "search", "provider")).sort()).toEqual(["issue-1", "project-1"]) + const [one] = ids(await cli("issues", "search", "provider", "--limit", "1")) + const second = await cli("issues", "search", "provider", "--limit", "1", "--page", "2") + expect(ids(second)).toHaveLength(1) + expect(ids(second)[0]).not.toBe(one) const task = (await cli("issues", "task", "ENG-2", "--due", "2026-12-01")).item expect(task).toMatchObject({ issue: "tracker:issue/issue-2", created: true }) diff --git a/src/tracker/cli/index.ts b/src/tracker/cli/index.ts index 74ac4e8fe..47c6e3c7c 100644 --- a/src/tracker/cli/index.ts +++ b/src/tracker/cli/index.ts @@ -105,7 +105,8 @@ const trackerSync = v.strictObject({ state: v.picklist(["partial", "complete"]), saved: count, unlisted: count, - pass: v.optional(v.picklist(["complete", "partial"])), + pass: v.optional(v.picklist(["complete", "partial", "held"])), + held: v.optional(text), error: v.optional(text), }), ), @@ -209,13 +210,24 @@ const addTrackerCommandsDefinition = (program: Command, options: TrackerCommandO }, ] : undefined - const issues = failed.map((one) => ({ - code: "provider_error" as const, - reason: "sync.partial", - source: `tracker:${one.kind}`, - })) + const issues = [ + ...failed.map((one) => ({ + code: "provider_error" as const, + reason: "sync.partial", + source: `tracker:${one.kind}`, + })), + ...report.synced + .filter((one) => one.pass === "held") + .map((one) => ({ + code: "validation_error" as const, + reason: "tracker.unlisted-held", + source: `tracker:${one.kind}`, + })), + ] return itemOf(report, { - ...(report.state === "partial" ? { meta: { complete: false, ...(issues.length ? { issues } : {}) } } : {}), + ...(report.state === "partial" || issues.length + ? { meta: { complete: false, ...(issues.length ? { issues } : {}) } } + : {}), ...(next ? { next } : {}), }) }) @@ -292,7 +304,10 @@ const addTrackerCommandsDefinition = (program: Command, options: TrackerCommandO parent: found.record.externalId, limit: MOST, }) - return itemOf({ ...issue, comments: comments.items.map((one) => viewOf(one)) }) + return itemOf( + { ...issue, comments: comments.items.map((one) => viewOf(one)) }, + comments.hasMore ? { meta: { complete: false } } : {}, + ) }) }) example( @@ -303,18 +318,20 @@ const addTrackerCommandsDefinition = (program: Command, options: TrackerCommandO .option("--any", "any word may match"), ), 'issues search "invoice currency"', - ).action(async (words: string[], opts: { any?: boolean; limit: number }, command: Command) => { + ).action(async (words: string[], opts: { any?: boolean; limit: number; page: number }, command: Command) => { await within(command, true, async (run) => { const found = await run.store.tracker.find({ words, accounts: [run.account], kinds: ["issue", "project", "comment"], limit: opts.limit, + offset: (opts.page - 1) * opts.limit, ...(opts.any ? { anyWord: true } : {}), }) return listOf("issues search", { items: found.items.map((hit) => viewOf(hit.item, { excerpt: hit.excerpt })), limit: opts.limit, + page: opts.page, has_more: found.hasMore, args: { words }, }) diff --git a/src/tracker/source.ts b/src/tracker/source.ts index 176cbed6d..828e9ff52 100644 --- a/src/tracker/source.ts +++ b/src/tracker/source.ts @@ -50,7 +50,9 @@ export interface TrackerSource { self?(context?: TrackerCallContext): Promise /** * What changed since `cursor`, a page at a time; `cursor: null` lists everything. A tracker without a change feed - * reads by its own modified time, with an overlap, and gives that time back as the cursor. + * reads by its own modified time, with an overlap, and gives back as the last page's cursor the time the round's + * first page was read, never the last one's: a round spread over runs must not skip what changed while it ran. + * `page` tokens carry that time along. */ changes( kind: K, diff --git a/src/tracker/sync.ts b/src/tracker/sync.ts index b61675640..2cf5120e1 100644 --- a/src/tracker/sync.ts +++ b/src/tracker/sync.ts @@ -6,6 +6,15 @@ import type { AccountKey } from "../store/types.js" import type { TrackerCallContext, TrackerGap, TrackerSource } from "./source.js" const DAY = 86_400_000 +/** An id pass that would mark more than this share of a kind deleted is held: a tracker that lost rights lists none. */ +const MOST_UNLISTED = 0.5 +const GUARDED_FROM = 10 + +/** `drop`: `--rescan` itself, which drops what is in progress; `full`: a rescan, asked now or by the run it goes on. */ +interface Mode { + drop: boolean + full: boolean +} /** Where a kind stands between runs: the cursor of its last finished round, and the round or id pass in progress. */ interface TrackerCursor { @@ -63,8 +72,13 @@ export interface TrackerSyncResult { saved: number /** Rows a complete id pass did not list, now marked deleted. */ unlisted: number - /** `complete`: a full list of ids arrived; `partial`: it stopped and goes on next run. Absent: none was due. */ - pass?: "complete" | "partial" + /** + * `complete`: a full list of ids arrived; `partial`: it stopped and goes on next run; `held`: it would mark too many + * deleted, or the sign-in could not read all of the kind, so nothing was. Absent: none was due. + */ + pass?: "complete" | "partial" | "held" + /** Why the pass was held, and how to let it through. */ + held?: string /** Set when the kind failed; its cursor stays at its last saved page. */ error?: string } @@ -101,11 +115,13 @@ interface Run { } /** Reads one kind's changes from where it stood, page by page, saving each page and the cursor after it. */ -const syncChanges = async (run: Run, kind: TrackerKind, result: TrackerSyncResult, rescan: boolean) => { +const syncChanges = async (run: Run, kind: TrackerKind, result: TrackerSyncResult, mode: Mode) => { const { source, store, account, budget } = run const name = trackerCursorName(kind) let cursor = parsed((await store.sync.syncState(account, name))?.value) ?? fresh() - let round = rescan ? { from: null, page: null } : (cursor.round ?? { from: cursor.token, page: null }) + let round = mode.drop + ? { from: null, page: null } + : (cursor.round ?? { from: mode.full ? null : cursor.token, page: null }) const save = (patch: Partial) => { cursor = { ...cursor, ...patch } return store.sync.setSyncState(account, name, JSON.stringify(cursor)) @@ -137,10 +153,12 @@ const syncChanges = async (run: Run, kind: TrackerKind, result: TrackerSyncResul run.report.progress.saved += page.items.length } run.report.progress.steps += 1 - if (!page.hasMore || page.nextCursor === undefined) { + if (!page.hasMore) { await save({ token: page.cursor ?? null, round: null }) return null } + if (page.nextCursor === undefined) + throw new CliError("invalid_response", `${source.provider} said there are more ${kind}s but gave no cursor`) if (pages.has(page.nextCursor)) throw new CliError("invalid_response", `${source.provider} gave the same page of ${kind}s twice`) pages.add(page.nextCursor) @@ -153,10 +171,10 @@ const syncChanges = async (run: Run, kind: TrackerKind, result: TrackerSyncResul * Lists every id of the kind and marks deleted each stored row the list lacks. Archived rows are listed, so only a row * the tracker deleted outright goes. A pass that stops keeps its ids and goes on next run. */ -const passIds = async (run: Run, kind: TrackerKind, result: TrackerSyncResult, rescan: boolean) => { +const passIds = async (run: Run, kind: TrackerKind, result: TrackerSyncResult, mode: Mode) => { const { source, store, account, budget } = run const name = passName(kind) - const pending = rescan ? null : parsed((await store.sync.syncState(account, name))?.value) + const pending = mode.drop ? null : parsed((await store.sync.syncState(account, name))?.value) let pass = pending ?? { v: 1, started: run.now, @@ -172,6 +190,11 @@ const passIds = async (run: Run, kind: TrackerKind, result: TrackerSyncResult, r } run.report.progress.requests += 1 const page = await source.ids(kind, pass.page ?? undefined, run.context) + if (run.signal?.aborted) { + await store.sync.setSyncState(account, name, JSON.stringify(pass)) + result.pass = "partial" + return "cancelled" as const + } pass = { ...pass, ids: [...pass.ids, ...page.items] } if (page.hasMore) { // A pass that ended early would mark every unread row deleted. @@ -181,12 +204,26 @@ const passIds = async (run: Run, kind: TrackerKind, result: TrackerSyncResult, r await store.sync.setSyncState(account, name, JSON.stringify(pass)) continue } - result.unlisted += await store.tracker.removeUnlisted(account, kind, pass.ids, pass.started, run.now) + const stored = await store.tracker.count(account, kind) + const unlisted = await store.tracker.removeUnlisted(account, kind, pass.ids, pass.started, run.now, { + dryRun: true, + }) + const unread = run.report.gaps.some((gap) => gap.kind === kind) + const emptied = pass.ids.length === 0 && unlisted > 0 + if (!mode.full && (unread || emptied || (stored >= GUARDED_FROM && unlisted > stored * MOST_UNLISTED))) { + result.pass = "held" + result.held = + `${source.provider} listed ${pass.ids.length} ${kind} ids${unread ? " and could not read all of them" : ""}, ` + + `so ${unlisted} of the ${stored} stored would be marked deleted; nothing was. Check the sign-in's rights, ` + + "then run sync --rescan to let it through" + } else { + result.unlisted += await store.tracker.removeUnlisted(account, kind, pass.ids, pass.started, run.now) + result.pass = "complete" + } await store.sync.setSyncState(account, name, "null") const cursor = parsed((await store.sync.syncState(account, trackerCursorName(kind)))?.value) ?? fresh() await store.sync.setSyncState(account, trackerCursorName(kind), JSON.stringify({ ...cursor, passAt: pass.started })) - result.pass = "complete" return null } } @@ -249,21 +286,29 @@ export const syncTracker = async ( const kinds = TRACKER_KINDS.filter((one) => source.traits.kinds.includes(one)) // A budget smaller than the kinds would spend itself re-reading the finished ones: a run that stopped leaves the kinds // it finished, and the next one goes on with the rest. - const done = new Set( - options.rescan - ? [] - : (parsed<{ v: 1; done: TrackerKind[] }>((await store.sync.syncState(account, RESUME))?.value)?.done ?? []), - ) + const resumed = options.rescan + ? null + : parsed<{ v: 1; done: TrackerKind[]; rescan?: true }>((await store.sync.syncState(account, RESUME))?.value) + const done = new Set(resumed?.done ?? []) + // A stopped rescan goes on as one: the kinds it had not reached still get their full list and their id pass. + const mode: Mode = { drop: options.rescan === true, full: options.rescan === true || resumed?.rescan === true } + // The kinds this run skips keep the gaps the runs that read them recorded. + if (resumed) + for (const gap of await trackerGapsOf(store, account)) + if (done.has(gap.kind)) { + said.add(`${gap.kind} ${gap.message}`) + report.gaps.push(gap) + } for (const kind of kinds.filter((one) => !done.has(one))) { const result: TrackerSyncResult = { kind, round: "full", reset: false, state: "partial", saved: 0, unlisted: 0 } report.synced.push(result) let stop: BudgetStop | null try { - stop = await stopping(() => syncChanges(run, kind, result, options.rescan === true)) + stop = await stopping(() => syncChanges(run, kind, result, mode)) const cursor = parsed((await store.sync.syncState(account, trackerCursorName(kind)))?.value) const pending = parsed((await store.sync.syncState(account, passName(kind)))?.value) - const due = options.rescan === true || pending !== null || now - (cursor?.passAt ?? 0) >= passEvery - if (!stop && due) stop = await stopping(() => passIds(run, kind, result, options.rescan === true)) + const due = mode.full || pending !== null || now - (cursor?.passAt ?? 0) >= passEvery + if (!stop && due) stop = await stopping(() => passIds(run, kind, result, mode)) } catch (error) { result.error = error instanceof Error ? error.message : String(error) report.complete = false @@ -279,7 +324,11 @@ export const syncTracker = async ( result.state = "complete" done.add(kind) } - await store.sync.setSyncState(account, RESUME, report.stopped ? JSON.stringify({ v: 1, done: [...done] }) : "null") + await store.sync.setSyncState( + account, + RESUME, + report.stopped ? JSON.stringify({ v: 1, done: [...done], ...(mode.full ? { rescan: true } : {}) }) : "null", + ) await store.sync.setSyncState(account, GAPS, JSON.stringify(report.gaps)) return report } diff --git a/src/tracker/tracker.test.ts b/src/tracker/tracker.test.ts index d3b47f891..b56985253 100644 --- a/src/tracker/tracker.test.ts +++ b/src/tracker/tracker.test.ts @@ -115,6 +115,86 @@ describe("syncTracker", () => { }) }) +describe("syncTracker guards", () => { + const DAYS = 2 * 86_400_000 + const T = Date.UTC(2026, 10, 17) + + it("holds an id pass that would empty a kind, or follows a gap, until --rescan lets it through", async () => { + const store = await storeOf() + const source = fakeTrackerSource({ rows: exampleTrackerRows() }) + await syncTracker(source, store, account, { now: T }) + const lost = { ...source, ids: (async () => ({ items: [], hasMore: false })) as typeof source.ids } + const held = await syncTracker(lost, store, account, { now: T + DAYS }) + expect(held.synced.find((one) => one.kind === "issue")).toMatchObject({ pass: "held", unlisted: 0 }) + expect(held.synced.find((one) => one.kind === "issue")?.held).toMatch(/run sync --rescan/) + expect(await store.tracker.count(account, "issue")).toBe(3) + + const gapped = { + ...source, + ids: (async (kind, page, context) => { + if (kind === "comment") context?.gap({ kind, message: "the sign-in cannot read one team's comments" }) + return source.ids(kind, page, context) + }) as typeof source.ids, + } + source.remove("comment", "comment-1") + const partly = await syncTracker(gapped, store, account, { now: T + 2 * DAYS }) + expect(partly.synced.find((one) => one.kind === "comment")?.pass).toBe("held") + expect(await store.tracker.count(account, "comment")).toBe(1) + + const emptied = { + ...lost, + changes: (async () => ({ items: [], hasMore: false, cursor: null })) as unknown as typeof source.changes, + } + const through = await syncTracker(emptied, store, account, { now: T + 3 * DAYS, rescan: true }) + expect(through.synced.find((one) => one.kind === "issue")).toMatchObject({ pass: "complete", unlisted: 3 }) + }) + + it("fails a kind whose page says there is more but gives no cursor, keeping the old cursor", async () => { + const store = await storeOf() + const source = fakeTrackerSource({ rows: exampleTrackerRows() }) + const broken = { + ...source, + changes: (async () => ({ items: [], hasMore: true })) as unknown as typeof source.changes, + } + const report = await syncTracker(broken, store, account, { now: T }) + expect(report.synced[0]?.error).toMatch(/gave no cursor/) + expect(report.state).toBe("partial") + }) + + it("goes on with a stopped --rescan as a rescan: the kinds it had not reached get a full list and an id pass", async () => { + const store = await storeOf() + const source = fakeTrackerSource({ rows: exampleTrackerRows() }) + await syncTracker(source, store, account, { now: T }) + const cut = await syncTracker(source, store, account, { + now: T + 1, + rescan: true, + budget: runBudget({ requests: 3 }), + }) + expect(cut.stopped).toBe("requests") + const rest = await syncTracker(source, store, account, { now: T + 2 }) + expect(rest.state).toBe("complete") + for (const one of rest.synced) expect(one).toMatchObject({ round: "full", pass: "complete" }) + const after = await syncTracker(source, store, account, { now: T + 3 }) + expect(after.synced.every((one) => one.round === "changes" && one.pass === undefined)).toBe(true) + }) + + it("stops an id pass when cancelled, keeping the ids it read", async () => { + const store = await storeOf() + const source = fakeTrackerSource({ rows: exampleTrackerRows(), pageSize: 1 }) + const controller = new AbortController() + const cancelling = { + ...source, + ids: (async (kind, page, context) => { + if (kind === "state" && page !== undefined) controller.abort() + return source.ids(kind, page, context) + }) as typeof source.ids, + } + const report = await syncTracker(cancelling, store, account, { now: T, signal: controller.signal }) + expect(report).toMatchObject({ stopped: "cancelled", state: "partial" }) + expect(report.synced.find((one) => one.kind === "state")).toMatchObject({ pass: "partial", unlisted: 0 }) + }) +}) + describe("store.tracker", () => { it("filters issues by state type, assignee and label, and finds them by their words", async () => { const store = await storeOf()