From 869008917620cb2915d4f711a5885ac526e4279b Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 25 Nov 2026 12:33:22 +0100 Subject: [PATCH 1/3] feat(people): bots are their own entity, apart from people (store version 75) A sender bot now holds its identities itself, in sender_bot_identities: an identity belongs to one person or one bot, never both, and its messages and mail keep pointing at the identity. A bot has a name, identities and an optional organization, no ties, no tasks, no merge review, and never appears in people.list, its counts, similar or ties. - Store version 75: the upgrade moves each version 74 bot's identities off its person row and logs the move. The row stays, kind 'merged', hidden as a merge's emptied person is, so a move back gives its uid back. sender_bots.person_id goes negative: a 1.0 build reads a bot as its person row, and this names none. - minCompatible stays 73. Triggers keep a 1.0 build apart: a bot's identity gets no link to a person, the person its ingest made goes again, a bot holding identities is not deleted, and a hidden person's kind stays 'merged'. A bot such a build sorts after the upgrade is settled by the next kept list. - Rules: a person whose kind is automated by a program's signal moves to a new bot, as before; a rule's bot goes back to the people its identities came from once the owner writes to it. The domain rule puts the new bots under their organization. - API: people.listBots (query, organization, paging) and showBot (with every move). moveToBot and moveToPerson take sender-bot:, person: or an identity; a person ref a bot emptied names the bot. - people.list rows lose `bot`; KindSignal loses `owner-choice`. Co-Authored-By: Claude Opus 5.5 --- api/store.api.txt | 2 + changes/feat-bot-entity.md | 19 + docs/dev/ARCHITECTURE.md | 41 +- docs/dev/GLOSSARY.md | 1 + docs/reasons.md | 5 +- docs/storage/schema.md | 20 +- .../migration.sql | 8 + .../snapshot.json | 26615 ++++++++++++++++ .../migration.sql | 68 + .../snapshot.json | 26615 ++++++++++++++++ package.json | 2 +- scripts/schema/sender-bots.mjs | 22 +- src/domain/person-kinds.ts | 7 +- src/errors/reasons.ts | 5 +- src/mail/sender-signals.test.ts | 15 +- src/store/areas.ts | 9 +- src/store/domain-organizations.test.ts | 2 +- src/store/index.ts | 11 +- src/store/people-list.test.ts | 17 +- src/store/people.ts | 50 +- src/store/person-match-scan.test.ts | 7 +- src/store/sender-bots.test.ts | 211 +- src/store/sqlite/domain-organizations.ts | 59 +- src/store/sqlite/identities.ts | 14 +- src/store/sqlite/manifest.ts | 2 + src/store/sqlite/merged-persons.ts | 8 +- src/store/sqlite/migrations.generated.ts | 26 + src/store/sqlite/people-list.ts | 87 +- src/store/sqlite/person-links.ts | 20 +- src/store/sqlite/person-match-scan.ts | 9 +- src/store/sqlite/schema.ts | 2 +- src/store/sqlite/schema/sender-bots.ts | 15 +- src/store/sqlite/sender-bots.ts | 651 +- src/store/sqlite/sender-signals.ts | 20 +- src/store/version-75.test.ts | 129 + src/testing/older-store.ts | 6 + 36 files changed, 54372 insertions(+), 428 deletions(-) create mode 100644 changes/feat-bot-entity.md create mode 100644 drizzle/20261125111113_version-75-bot-identities/migration.sql create mode 100644 drizzle/20261125111113_version-75-bot-identities/snapshot.json create mode 100644 drizzle/20261125111118_version-75-bot-identities-moved/migration.sql create mode 100644 drizzle/20261125111118_version-75-bot-identities-moved/snapshot.json create mode 100644 src/store/version-75.test.ts diff --git a/api/store.api.txt b/api/store.api.txt index 868f975dd..ce446ae83 100644 --- a/api/store.api.txt +++ b/api/store.api.txt @@ -416,6 +416,8 @@ PeopleStore · interface · similar(name: string, options?: { PeopleStore · interface · limit?: number; PeopleStore · interface · }): Promise; PeopleStore · interface · ties(people: readonly string[]): Promise>; +PeopleStore · interface · listBots(options: BotListOptions): Promise; +PeopleStore · interface · showBot(bot: string): Promise; PeopleStore · interface · moveToBot(subject: string | IdentityRef, by: Decider, options?: { PeopleStore · interface · bot?: string; PeopleStore · interface · name?: string; diff --git a/changes/feat-bot-entity.md b/changes/feat-bot-entity.md new file mode 100644 index 000000000..286ed9ed1 --- /dev/null +++ b/changes/feat-bot-entity.md @@ -0,0 +1,19 @@ +### Added + +- **`store.people.listBots` and `showBot`** read the sender bots: by name, by part of a name, address or username, or by + the organization they send for (`organization:`). `showBot` adds every move to or from the bot. memo and Desktop + build their bots list on them. + +### Changed — experimental + +- **Bots are their own entity, apart from people (store version 75).** A sender bot (`sender-bot:`) now holds its + identities itself, in `sender_bot_identities`: an identity belongs to one person or one bot, never both. Its messages + and mail keep pointing at the identity. A bot never appears in `people.list`, its counts, `people.similar` or + `people.ties`; `people list kind:automated` keeps the people a name or a bulk mailbox marks. The upgrade moves every + version 74 bot's identities off its person row. That row stays, hidden, so a move back gives its uid back, and its + `person:` ref still names the bot in a move. `minCompatible` stays 73: triggers keep a 1.0 build from giving a bot's + identity a person again, and the next list settles a bot such a build sorts. +- **`SenderBot` describes the bot itself**: its name, identities, organization, author, reason, counts, reach and + signals, and no longer `person`. `moveToPerson` gives each identity back to the person it came from unless `person` is + named. Both moves take `sender-bot:`, `person:` or an identity. +- **`people.list` rows lose `bot`**, and `KindSignal` loses `owner-choice`: no listed row is a bot. diff --git a/docs/dev/ARCHITECTURE.md b/docs/dev/ARCHITECTURE.md index df6080829..eee972c9d 100644 --- a/docs/dev/ARCHITECTURE.md +++ b/docs/dev/ARCHITECTURE.md @@ -692,27 +692,36 @@ proposes them instead. A no-reply address (`isNoReplyAddress`) is no one's: it n tie; mail the owner wrote them or a private chat both wrote in makes it `direct`, and with no mail a one-to-one chat or a small group does. `null` when nothing says. The page reads the List-Ids of its people's mail, and the senders of those lists through the index `emails_by_list_id` (version 74). -- **Sender bots** (`sender-bots.ts`, version 74): a program that writes to the owner is a `sender_bots` row, not a - person. A bot keeps the person row it was sorted from: its identities stay linked there, so ingest, merges, purges and - `people show person:` work as before, and `people.list` lists it as `automated` under that ref with - `bot: "sender-bot:"` and no ties. Kept kinds move a person to a bot by rule when their kind is `automated` by a - program's signal (`PROGRAM_SIGNALS`: the platform's bot flag, a no-reply or notification address, a signed - `Auto-Submitted`, an empty Return-Path, `bulk_never_replied`), the owner wrote them nothing (no mail tie, no private - chat both wrote in; the platform's flag holds against both), no `ALWAYS_SHOWN` reason holds, and every identity of - theirs is the program's, or they have one. A name or a bulk mailbox alone marks a person `automated` and moves - nothing: a newsletter a human writes stays a person. A rule's bot goes back to a person when those rules stop holding. - The owner's `moveToBot` and `moveToPerson` move a person, a bot or one identity (one of several gets a person row of - its own first) for its whole history, and win over the rules and every `KIND_RULES` bump: a bot the owner made has - `author = 'owner'`, and an identity whose latest move is the owner's to a person is never moved by a rule. Every move - is a `sender_bot_moves` row. A bot is never joined to anyone by the matcher (`identity.not-a-person`), never assigned a - task (`sender-bot.assignee`), never offered by `people.similar` and has no ties in `people.ties`. Neither table has a - foreign key, so an older build erasing a person or purging an account still can; triggers drop their rows. +- **Sender bots** (`sender-bots.ts`, versions 74 and 75): a program that writes to the owner is a sender bot + (`sender-bot:`, a `sender_bots` row), an entity apart from people. Its identities are `sender_bot_identities` rows + and leave `identity_links`: an identity belongs to one person or one bot, never both, and its messages and mail keep + pointing at the identity. A bot has a name, identities and an optional organization; it has no ties, no tasks, no + merge review, and never appears in `people.list`, its counts, `people.similar` or `people.ties`. `people.listBots` and + `people.showBot` read them (`showBot` with every move). `bot:` stays the agents' ref (the `bots` table). Kept kinds + move a person's identities to a new bot by rule when their kind is `automated` by a program's signal + (`PROGRAM_SIGNALS`: the platform's bot flag, a no-reply or notification address, a signed `Auto-Submitted`, an empty + Return-Path, `bulk_never_replied`), the owner wrote them nothing (no mail tie, no private chat both wrote in; the + platform's flag holds against both), no `ALWAYS_SHOWN` reason holds, and every identity of theirs is the program's, + or they have one. A name or a bulk mailbox alone marks a person `automated` and moves nothing: a newsletter a human + writes stays a person. A rule's bot goes back to the people its identities came from once the owner writes to it + (`ruleBotsBack`). The owner's `moveToBot` and `moveToPerson` move a person, a bot or one identity for its whole + history, and win over the rules and every `KIND_RULES` bump: a bot the owner made has `author = 'owner'`, and an + identity whose latest move is the owner's to a person is never moved by a rule. Every move is a `sender_bot_moves` + row. **The person row a bot emptied stays**, stored with kind `merged` and hidden as a merge's emptied person is + (`mergedAwaySql`), so a move back gives its uid back and the rows that name it keep their meaning; its `person:` ref + still names the bot in a move, `tasks.assign` refuses it (`sender-bot.assignee`), and the matcher never sees a bot's + identities. `sender_bots.person_id` only keeps builds before version 75 from reading a bot as a person: negative + since. Those builds still write to a migrated store, so triggers keep them apart: a bot's identity gets no link to a + person (`RAISE(IGNORE)`), the person row their ingest made for it goes again, a bot holding identities is not deleted, + and a hidden person's kind stays `merged`. A positive `person_id` is a bot such a build sorted after the upgrade; the + next kept list moves its identities to it (`settleLegacyBots`). No table has a foreign key, so an older build purging + an account still can; triggers drop a bot's rows with its last identity. - **Organizations from mail domains** (`domain-organizations.ts`, plan step 5): when kinds are kept, a bot or a shared mailbox (every address a role address) at a company domain joins the organization of its registrable domain (`registrableOf`, so `mail.bank.example` is `bank.example`): the organization already holding an address there, else a new `company` named by the sender when the name is a company's or the domain's own word, else by the domain. Its addresses go to `organization_identities` with method `domain`, author `rules`, and a bot's `sender_bots.organization_id` - is set. A human with an address there gets a `member-of` link (author `rule`), never a merge and never a proposal; a + is set (`people.listBots` filters by it). A human with an address there gets a `member-of` link (author `rule`), never a merge and never a proposal; a human alone makes no organization. Free mail (`FREE_MAIL`), throwaway mail (`disposable-email-domains-js`) and sending platforms (`SENDING_PLATFORMS`) are never a company domain. Two organizations holding one domain leave it ungrouped. Each organization holding a company domain takes that domain's `metadata.sector` (`Organization.sector`: diff --git a/docs/dev/GLOSSARY.md b/docs/dev/GLOSSARY.md index d9de8aae0..0e503005d 100644 --- a/docs/dev/GLOSSARY.md +++ b/docs/dev/GLOSSARY.md @@ -76,6 +76,7 @@ Verbs used but not in cli-base's vocabulary, by CLI (2026-10-12). Each needs a r | project | the owner's work unit with a task key | entity | `entity:` references still parse for old files | | organization | a company, team, family or community | entity | none | | person | one human, across every messenger and mail (`person:`) | user, people | tg bot help: "user: for a person", "the person's user id"; drive `people` | +| bot | a program that writes to the owner: a no-reply or alert address, a messenger's bot, a service's mail; an entity apart from people, with a name, identities and an optional organization, and no ties, tasks or merge review (`sender-bot:`, the `sender_bots` table). Not an agent: `bot:` and the `bots` table are agents that work here | automated person, sender (for a bot) | `people list kind:automated` still lists people a name or a bulk mailbox marks; memo's `{ bot }` author and `bot list` mean agents and a messenger's bot account | | contact | one person as one source knows them: a mail correspondent, a Telegram user, a Drive owner, a calendar attendee; an `identities` row | user | none found beyond the above | | entity | the thing the owner means — a person, an event, a document; it carries no provider id ([WC-DATA-2](https://github.com/WireCatLabs/cli-base/blob/main/docs/standards/data-model.md)) | record, object | none | | source record | one source's copy of an entity, keyed by account and `external_id`: a contact, a Zoom meeting, an email, a message | entity, item | none | diff --git a/docs/reasons.md b/docs/reasons.md index 1f02d34bd..f5f496f70 100644 --- a/docs/reasons.md +++ b/docs/reasons.md @@ -516,8 +516,9 @@ headings. | `selection.invalid` | `validation_error` | the selection is not valid | | | `selection.out-of-scope` | `permission_error` | the selection reaches outside what this profile may read | | | `sender-bot.assignee` | `validation_error` | a sender bot is no one's assignee; move it to a person first | | -| `sender-bot.not-a-person` | `validation_error` | the person named is a sender bot; name a person | | -| `sender-bot.not-found` | `not_found` | no sender bot has that id; people list kind:automated lists them | | +| `sender-bot.empty` | `validation_error` | the person or bot named holds no identity to move | | +| `sender-bot.not-a-person` | `validation_error` | the identity named is a sender bot's, not a person's; name a person | | +| `sender-bot.not-found` | `not_found` | no sender bot has that id; the bots list names them | | | `sender-bot.owner` | `validation_error` | the owner's own person is never a bot | | | `serve.outdated` | `configuration_error` | the store or the installed version is newer than this serve; it stopped so its unit starts the installed one | | | `session.duplicate` | `conflict` | another profile here already signs in to this account as this user | | diff --git a/docs/storage/schema.md b/docs/storage/schema.md index 729b0efae..cf2e43df2 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. -147 tables, 28 full-text indexes. +148 tables, 28 full-text indexes. ## Conventions @@ -335,12 +335,12 @@ An AI agent or a script that works here: it registers itself, owns projects and ### `sender_bots` -A program that writes to the owner: a no-reply or alert address, a messenger bot, a service's mail. Not a person, so it is never proposed as the same person, has no ties and is no task's assignee. Its identities are those of the person row it was sorted from, which `people list` shows as `automated`. Not the `bots` table, which holds agents that work here. +A program that writes to the owner: a no-reply or alert address, a messenger bot, a service's mail. An entity of its own beside `persons` (`sender-bot:`): it holds its identities in `sender_bot_identities`, never in `identity_links`, so it is never listed or proposed as a person, has no ties and is no task's assignee. Not the `bots` table, which holds agents that work here. | Column | Type | Constraints | References | Meaning | |---|---|---|---|---| | `id` | integer | PK | | | -| `person_id` | integer | not null, unique | | the person row whose identities are this bot's; its `person:` uid stays the bot's handle in lists. No foreign key: an older build erasing the person does not know this table, and a trigger drops the bot with it | +| `person_id` | integer | not null, unique | | kept for builds before version 75, which read a bot as this person row: negative for every bot since, so it names no person. A positive one is a bot such a build sorted after the upgrade, whose identities the next list moves here | | `name` | text | | | the owner's name for it; null shows its identities' name | | `organization_id` | integer | | | the organization it sends for; no foreign key, a trigger clears it when the organization row goes | | `author` | text | not null | | `rules` or `owner`: the owner's bot never goes back by a rule | @@ -348,6 +348,18 @@ A program that writes to the owner: a no-reply or alert address, a messenger bot | `created_at` | integer | not null | | when this row was saved here | | `updated_at` | integer | not null | | when this row last changed here | +### `sender_bot_identities` + +The identities a sender bot holds. An identity is here or in `identity_links`, never both: a trigger refuses its link to a person while a bot holds it, so an older build's sync gives it no person again. Its messages and mail keep pointing at the identity. + +| Column | Type | Constraints | References | Meaning | +|---|---|---|---|---| +| `identity_id` | integer | PK | | no foreign key, as the other bot tables: an older build purging an account does not know this table, and a trigger drops the row with the identity | +| `bot_id` | integer | not null | | the `sender_bots` row; the bot goes when its last identity does | +| `created_at` | integer | not null | | when the bot took it | + +*Keys and indexes:* `INDEX (bot_id)` + ### `sender_bot_moves` Every move of an identity between a person and a sender bot, by the rules or by the owner. An identity whose latest move is the owner's is never moved by a rule again. A trigger drops an identity's rows with it. @@ -364,7 +376,7 @@ Every move of an identity between a person and a sender bot, by the rules or by | `reason` | text | | | the kind signals of a rule's move, or the owner's words | | `created_at` | integer | not null | | when it moved | -*Keys and indexes:* `INDEX (identity_id)` +*Keys and indexes:* `INDEX (identity_id)`, `INDEX (from_person_id)` ## Chats and messages diff --git a/drizzle/20261125111113_version-75-bot-identities/migration.sql b/drizzle/20261125111113_version-75-bot-identities/migration.sql new file mode 100644 index 000000000..bac776f90 --- /dev/null +++ b/drizzle/20261125111113_version-75-bot-identities/migration.sql @@ -0,0 +1,8 @@ +CREATE TABLE `sender_bot_identities` ( + `identity_id` integer PRIMARY KEY, + `bot_id` integer NOT NULL, + `created_at` integer NOT NULL +); +--> statement-breakpoint +CREATE INDEX `sender_bot_identities_by_bot_id` ON `sender_bot_identities` (`bot_id`);--> statement-breakpoint +CREATE INDEX `sender_bot_moves_by_from_person_id` ON `sender_bot_moves` (`from_person_id`); \ No newline at end of file diff --git a/drizzle/20261125111113_version-75-bot-identities/snapshot.json b/drizzle/20261125111113_version-75-bot-identities/snapshot.json new file mode 100644 index 000000000..a47df4bae --- /dev/null +++ b/drizzle/20261125111113_version-75-bot-identities/snapshot.json @@ -0,0 +1,26615 @@ +{ + "version": "7", + "dialect": "sqlite", + "id": "91511da2-9cf8-49f9-b0de-6c6719bfa527", + "prevIds": [ + "e442fdb3-c8b6-4253-bd3e-0c53da259ba2" + ], + "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": "content_authors", + "entityType": "tables" + }, + { + "name": "content_channels", + "entityType": "tables" + }, + { + "name": "content_metrics", + "entityType": "tables" + }, + { + "name": "content_post_revisions", + "entityType": "tables" + }, + { + "name": "content_posts", + "entityType": "tables" + }, + { + "name": "content_terms", + "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_changes", + "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": "sender_bot_identities", + "entityType": "tables" + }, + { + "name": "sender_bot_moves", + "entityType": "tables" + }, + { + "name": "sender_bots", + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": "content_authors", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "email", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "network", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "handle", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "post_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "views", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "reactions", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "comments", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "shares", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "clicks", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "raw", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "post_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "version", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "reason", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "channel_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "title_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "published_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "scheduled_for", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "source_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "version", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "normalized_text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "slug", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "parent_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "tag_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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_changes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "document_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "path", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "event", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "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": true, + "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": "document_revisions", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "front_matter", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "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": "documents", + "name": "removal", + "type": "text", + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": "sender_bot_identities", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_identities", + "name": "bot_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "from_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "from_bot_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "to_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "to_bot_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "person_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": "content_metrics", + "name": "content_metrics_by_post_id_at", + "columns": [ + { + "value": "post_id", + "isExpression": false + }, + { + "value": "at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_post_revisions", + "name": "content_post_revisions_by_post_id_created_at", + "columns": [ + { + "value": "post_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_posts", + "name": "content_posts_by_account_id_status", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "status", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_posts", + "name": "content_posts_by_account_id_published_at", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "published_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_terms", + "name": "content_terms_by_tag_id", + "columns": [ + { + "value": "tag_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_changes", + "name": "document_changes_by_account_id_at", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "at", + "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_list_id", + "columns": [ + { + "value": "coalesce(json_extract(headers, '$.\"list-id\"'), json_extract(metadata, '$.listId'))", + "isExpression": true + } + ], + "isUnique": false, + "where": 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_chat_id_thread_external_id", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "thread_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "thread_root_id IS NULL AND thread_external_id IS NOT 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": "sender_bot_identities", + "name": "sender_bot_identities_by_bot_id", + "columns": [ + { + "value": "bot_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "sender_bot_moves", + "name": "sender_bot_moves_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "sender_bot_moves", + "name": "sender_bot_moves_by_from_person_id", + "columns": [ + { + "value": "from_person_id", + "isExpression": false + } + ], + "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_taggable_type_taggable_id", + "columns": [ + { + "value": "taggable_type", + "isExpression": false + }, + { + "value": "taggable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "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": "content_authors", + "name": "fk_content_authors_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_channels", + "name": "fk_content_channels_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_metrics", + "name": "fk_content_metrics_post_id_content_posts_id_fk", + "columns": [ + "post_id" + ], + "tableTo": "content_posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_post_revisions", + "name": "fk_content_post_revisions_post_id_content_posts_id_fk", + "columns": [ + "post_id" + ], + "tableTo": "content_posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_posts", + "name": "fk_content_posts_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_terms", + "name": "fk_content_terms_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_terms", + "name": "fk_content_terms_tag_id_canonical_tags_id_fk", + "columns": [ + "tag_id" + ], + "tableTo": "canonical_tags", + "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": "content_authors", + "name": "content_authors_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_channels", + "name": "content_channels_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_metrics", + "name": "content_metrics_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_post_revisions", + "name": "content_post_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_posts", + "name": "content_posts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_terms", + "name": "content_terms_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_changes", + "name": "document_changes_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": "sender_bot_identities", + "name": "sender_bot_identities_pk", + "columns": [ + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sender_bot_moves", + "name": "sender_bot_moves_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sender_bots", + "name": "sender_bots_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": "content_authors", + "name": "content_authors_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "content_channels", + "name": "content_channels_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "content_posts", + "name": "content_posts_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "content_terms", + "name": "content_terms_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "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": "sender_bots", + "name": "sender_bots_person_id_unique", + "columns": [ + "person_id" + ], + "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" + }, + { + "table": "accounts", + "name": "accounts_settings_json", + "value": "\"settings\" IS NULL OR json_valid(\"settings\")", + "entityType": "checks" + }, + { + "table": "agent_actions", + "name": "agent_actions_target_pair", + "value": "(\"target_type\" IS NULL) = (\"target_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "attachments", + "name": "attachments_provider_ref_json", + "value": "\"provider_ref\" IS NULL OR json_valid(\"provider_ref\")", + "entityType": "checks" + }, + { + "table": "attachments", + "name": "attachments_contact_json", + "value": "\"contact\" IS NULL OR json_valid(\"contact\")", + "entityType": "checks" + }, + { + "table": "bot_updates", + "name": "bot_updates_payload_json", + "value": "\"payload\" IS NULL OR json_valid(\"payload\")", + "entityType": "checks" + }, + { + "table": "bots", + "name": "bots_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_recurrence_json", + "value": "\"recurrence\" IS NULL OR json_valid(\"recurrence\")", + "entityType": "checks" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "catalog_items", + "name": "catalog_items_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "catalog_items", + "name": "catalog_items_supplier_pair", + "value": "(\"supplier_type\" IS NULL) = (\"supplier_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "catalog_items", + "name": "catalog_items_unit_price_not_negative", + "value": "\"unit_price\" IS NULL OR \"unit_price\" >= 0", + "entityType": "checks" + }, + { + "table": "chats", + "name": "chats_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "content_authors", + "name": "content_authors_data_json", + "value": "\"data\" IS NULL OR json_valid(\"data\")", + "entityType": "checks" + }, + { + "table": "content_metrics", + "name": "content_metrics_raw_json", + "value": "\"raw\" IS NULL OR json_valid(\"raw\")", + "entityType": "checks" + }, + { + "table": "content_posts", + "name": "content_posts_data_json", + "value": "\"data\" IS NULL OR json_valid(\"data\")", + "entityType": "checks" + }, + { + "table": "content_terms", + "name": "content_terms_data_json", + "value": "\"data\" IS NULL OR json_valid(\"data\")", + "entityType": "checks" + }, + { + "table": "contracts", + "name": "contracts_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "contracts", + "name": "contracts_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "contracts", + "name": "contracts_value_not_negative", + "value": "\"value\" IS NULL OR \"value\" >= 0", + "entityType": "checks" + }, + { + "table": "crm_fields", + "name": "crm_fields_options_json", + "value": "\"options\" IS NULL OR json_valid(\"options\")", + "entityType": "checks" + }, + { + "table": "deals", + "name": "deals_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "deals", + "name": "deals_amount_not_negative", + "value": "\"amount\" IS NULL OR \"amount\" >= 0", + "entityType": "checks" + }, + { + "table": "decisions", + "name": "decisions_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "decisions", + "name": "decisions_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "document_revisions", + "name": "document_revisions_front_matter_json", + "value": "\"front_matter\" IS NULL OR json_valid(\"front_matter\")", + "entityType": "checks" + }, + { + "table": "documents", + "name": "documents_front_matter_json", + "value": "\"front_matter\" IS NULL OR json_valid(\"front_matter\")", + "entityType": "checks" + }, + { + "table": "documents", + "name": "documents_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "email_threads", + "name": "email_threads_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "emails", + "name": "emails_references_json", + "value": "\"references\" IS NULL OR json_valid(\"references\")", + "entityType": "checks" + }, + { + "table": "emails", + "name": "emails_headers_json", + "value": "\"headers\" IS NULL OR json_valid(\"headers\")", + "entityType": "checks" + }, + { + "table": "emails", + "name": "emails_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "facts", + "name": "facts_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "facts", + "name": "facts_subject_pair", + "value": "(\"subject_type\" IS NULL) = (\"subject_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "facts", + "name": "facts_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "files", + "name": "files_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_holder_pair", + "value": "(\"holder_type\" IS NULL) = (\"holder_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_counterparty_pair", + "value": "(\"counterparty_type\" IS NULL) = (\"counterparty_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "identities", + "name": "identities_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "identity_revisions", + "name": "identity_revisions_marks_json", + "value": "\"marks\" IS NULL OR json_valid(\"marks\")", + "entityType": "checks" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_amount_not_negative", + "value": "\"amount\" IS NULL OR \"amount\" >= 0", + "entityType": "checks" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_unit_price_not_negative", + "value": "\"unit_price\" IS NULL OR \"unit_price\" >= 0", + "entityType": "checks" + }, + { + "table": "invoices", + "name": "invoices_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "invoices", + "name": "invoices_issuer_pair", + "value": "(\"issuer_type\" IS NULL) = (\"issuer_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "invoices", + "name": "invoices_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "invoices", + "name": "invoices_total_not_negative", + "value": "\"total\" IS NULL OR \"total\" >= 0", + "entityType": "checks" + }, + { + "table": "leads", + "name": "leads_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "leads", + "name": "leads_amount_not_negative", + "value": "\"amount\" IS NULL OR \"amount\" >= 0", + "entityType": "checks" + }, + { + "table": "link_reviews", + "name": "link_reviews_candidates_json", + "value": "\"candidates\" IS NULL OR json_valid(\"candidates\")", + "entityType": "checks" + }, + { + "table": "link_revisions", + "name": "link_revisions_before_json", + "value": "\"before\" IS NULL OR json_valid(\"before\")", + "entityType": "checks" + }, + { + "table": "links", + "name": "links_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "mail_rules", + "name": "mail_rules_conditions_json", + "value": "\"conditions\" IS NULL OR json_valid(\"conditions\")", + "entityType": "checks" + }, + { + "table": "mail_rules", + "name": "mail_rules_actions_json", + "value": "\"actions\" IS NULL OR json_valid(\"actions\")", + "entityType": "checks" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_sessions_json", + "value": "\"sessions\" IS NULL OR json_valid(\"sessions\")", + "entityType": "checks" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "meeting_series", + "name": "meeting_series_recurrence_json", + "value": "\"recurrence\" IS NULL OR json_valid(\"recurrence\")", + "entityType": "checks" + }, + { + "table": "meeting_series", + "name": "meeting_series_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "meeting_summaries", + "name": "meeting_summaries_sections_json", + "value": "\"sections\" IS NULL OR json_valid(\"sections\")", + "entityType": "checks" + }, + { + "table": "meeting_summaries", + "name": "meeting_summaries_next_steps_json", + "value": "\"next_steps\" IS NULL OR json_valid(\"next_steps\")", + "entityType": "checks" + }, + { + "table": "meeting_summaries", + "name": "meeting_summaries_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_rows_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "meeting_transcripts", + "name": "meeting_transcripts_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "meetings", + "name": "meetings_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "memories", + "name": "memories_subject_pair", + "value": "(\"subject_type\" IS NULL) = (\"subject_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "messages", + "name": "messages_reply_to_json", + "value": "\"reply_to\" IS NULL OR json_valid(\"reply_to\")", + "entityType": "checks" + }, + { + "table": "messages", + "name": "messages_forward_json", + "value": "\"forward\" IS NULL OR json_valid(\"forward\")", + "entityType": "checks" + }, + { + "table": "messages", + "name": "messages_reactions_json", + "value": "\"reactions\" IS NULL OR json_valid(\"reactions\")", + "entityType": "checks" + }, + { + "table": "messages", + "name": "messages_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "messages", + "name": "messages_mentions_json", + "value": "\"mentions\" IS NULL OR json_valid(\"mentions\")", + "entityType": "checks" + }, + { + "table": "notes", + "name": "notes_author_pair", + "value": "(\"author_type\" IS NULL) = (\"author_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "order_lines", + "name": "order_lines_amount_not_negative", + "value": "\"amount\" IS NULL OR \"amount\" >= 0", + "entityType": "checks" + }, + { + "table": "order_lines", + "name": "order_lines_unit_price_not_negative", + "value": "\"unit_price\" IS NULL OR \"unit_price\" >= 0", + "entityType": "checks" + }, + { + "table": "orders", + "name": "orders_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "orders", + "name": "orders_supplier_pair", + "value": "(\"supplier_type\" IS NULL) = (\"supplier_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "orders", + "name": "orders_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "orders", + "name": "orders_total_not_negative", + "value": "\"total\" IS NULL OR \"total\" >= 0", + "entityType": "checks" + }, + { + "table": "organizations", + "name": "organizations_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "payments", + "name": "payments_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "payments", + "name": "payments_payer_pair", + "value": "(\"payer_type\" IS NULL) = (\"payer_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "payments", + "name": "payments_payee_pair", + "value": "(\"payee_type\" IS NULL) = (\"payee_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "payments", + "name": "payments_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "poll_votes", + "name": "poll_votes_answers_json", + "value": "\"answers\" IS NULL OR json_valid(\"answers\")", + "entityType": "checks" + }, + { + "table": "projects", + "name": "projects_owner_pair", + "value": "(\"owner_type\" IS NULL) = (\"owner_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_payload_json", + "value": "\"payload\" IS NULL OR json_valid(\"payload\")", + "entityType": "checks" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_result_json", + "value": "\"result\" IS NULL OR json_valid(\"result\")", + "entityType": "checks" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_target_pair", + "value": "(\"target_type\" IS NULL) = (\"target_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_decided_by_pair", + "value": "(\"decided_by_type\" IS NULL) = (\"decided_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "records", + "name": "records_fields_json", + "value": "\"fields\" IS NULL OR json_valid(\"fields\")", + "entityType": "checks" + }, + { + "table": "records", + "name": "records_entity_pair", + "value": "(\"entity_type\" IS NULL) = (\"entity_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "searches", + "name": "searches_params_json", + "value": "\"params\" IS NULL OR json_valid(\"params\")", + "entityType": "checks" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_amount_not_negative", + "value": "\"amount\" IS NULL OR \"amount\" >= 0", + "entityType": "checks" + }, + { + "table": "subscriptions", + "name": "subscriptions_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "subscriptions", + "name": "subscriptions_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "syncs", + "name": "syncs_counts_json", + "value": "\"counts\" IS NULL OR json_valid(\"counts\")", + "entityType": "checks" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_source_member_ids_json", + "value": "\"source_member_ids\" IS NULL OR json_valid(\"source_member_ids\")", + "entityType": "checks" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_survivor_member_ids_json", + "value": "\"survivor_member_ids\" IS NULL OR json_valid(\"survivor_member_ids\")", + "entityType": "checks" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_counts_json", + "value": "\"counts\" IS NULL OR json_valid(\"counts\")", + "entityType": "checks" + }, + { + "table": "taggings", + "name": "taggings_author_pair", + "value": "(\"author_type\" IS NULL) = (\"author_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "task_events", + "name": "task_events_changes_json", + "value": "\"changes\" IS NULL OR json_valid(\"changes\")", + "entityType": "checks" + }, + { + "table": "task_events", + "name": "task_events_actor_pair", + "value": "(\"actor_type\" IS NULL) = (\"actor_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "task_pairs", + "name": "task_pairs_levels_json", + "value": "\"levels\" IS NULL OR json_valid(\"levels\")", + "entityType": "checks" + }, + { + "table": "task_pairs", + "name": "task_pairs_reasons_json", + "value": "\"reasons\" IS NULL OR json_valid(\"reasons\")", + "entityType": "checks" + }, + { + "table": "task_pairs", + "name": "task_pairs_decided_by_pair", + "value": "(\"decided_by_type\" IS NULL) = (\"decided_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "tasks", + "name": "tasks_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "tasks", + "name": "tasks_closed_by_pair", + "value": "(\"closed_by_type\" IS NULL) = (\"closed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "tasks", + "name": "tasks_close_suggested_by_pair", + "value": "(\"close_suggested_by_type\" IS NULL) = (\"close_suggested_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "tracker_items", + "name": "tracker_items_data_json", + "value": "\"data\" IS NULL OR json_valid(\"data\")", + "entityType": "checks" + } + ], + "renames": [] +} \ No newline at end of file diff --git a/drizzle/20261125111118_version-75-bot-identities-moved/migration.sql b/drizzle/20261125111118_version-75-bot-identities-moved/migration.sql new file mode 100644 index 000000000..4009a14b7 --- /dev/null +++ b/drizzle/20261125111118_version-75-bot-identities-moved/migration.sql @@ -0,0 +1,68 @@ +-- A bot of version 74 is a person row holding the bot's identities. Each identity moves to the bot, the move is logged +-- with the bot's author, and the person row stays, emptied and hidden, so a move back gives its uid back. +INSERT INTO sender_bot_identities (identity_id, bot_id, created_at) +SELECT l.identity_id, b.id, CAST(unixepoch('subsec') * 1000 AS INTEGER) +FROM sender_bots b JOIN identity_links l ON l.person_id = b.person_id; +--> statement-breakpoint +INSERT INTO sender_bot_moves (identity_id, from_person_id, from_bot_id, to_person_id, to_bot_id, author, reason, created_at) +SELECT s.identity_id, b.person_id, NULL, NULL, b.id, b.author, 'store version 75: a bot holds its own identities', + CAST(unixepoch('subsec') * 1000 AS INTEGER) +FROM sender_bot_identities s JOIN sender_bots b ON b.id = s.bot_id; +--> statement-breakpoint +DELETE FROM identity_links WHERE identity_id IN (SELECT identity_id FROM sender_bot_identities); +--> statement-breakpoint +-- Negative: a build before 75 reads a bot as its person row, and this names none. +UPDATE sender_bots SET person_id = -id; +--> statement-breakpoint +-- Stored as a merge's emptied person is, so every build's people list leaves it out. +CREATE TRIGGER person_kind_sender_bot_origin_au AFTER UPDATE OF kind ON persons +WHEN NEW.kind IS NOT 'merged' AND NEW.owner = 0 + AND NOT EXISTS (SELECT 1 FROM identity_links WHERE person_id = NEW.id) + AND EXISTS (SELECT 1 FROM sender_bot_moves WHERE from_person_id = NEW.id AND to_bot_id IS NOT NULL) BEGIN + UPDATE persons SET kind = 'merged' WHERE id = NEW.id; +END; +--> statement-breakpoint +UPDATE persons SET kind = 'merged' WHERE owner = 0 + AND NOT EXISTS (SELECT 1 FROM identity_links WHERE person_id = persons.id) + AND EXISTS (SELECT 1 FROM sender_bot_moves WHERE from_person_id = persons.id AND to_bot_id IS NOT NULL); +--> statement-breakpoint +-- An older build's sync links an identity with no person to a new one: a bot's identity gets none. +CREATE TRIGGER sender_bot_identity_link_bi BEFORE INSERT ON identity_links +WHEN EXISTS (SELECT 1 FROM sender_bot_identities WHERE identity_id = NEW.identity_id) BEGIN + SELECT RAISE(IGNORE); +END; +--> statement-breakpoint +-- ...and the person row it made for it, with its log row, goes again. +CREATE TRIGGER sender_bot_identity_person_ai AFTER INSERT ON identity_link_events +WHEN NEW.from_person_id IS NULL + AND EXISTS (SELECT 1 FROM sender_bot_identities WHERE identity_id = NEW.identity_id) + AND NOT EXISTS (SELECT 1 FROM identity_links WHERE person_id = NEW.to_person_id) BEGIN + DELETE FROM identity_link_events WHERE id = NEW.id; + DELETE FROM persons WHERE id = NEW.to_person_id AND owner = 0 + AND NOT EXISTS (SELECT 1 FROM identity_link_events WHERE from_person_id = NEW.to_person_id OR to_person_id = NEW.to_person_id); +END; +--> statement-breakpoint +CREATE TRIGGER sender_bot_identities_linked_bi BEFORE INSERT ON sender_bot_identities +WHEN EXISTS (SELECT 1 FROM identity_links WHERE identity_id = NEW.identity_id) BEGIN + SELECT RAISE(ABORT, 'sender_bot_identities: the identity is linked to a person; unlink it first'); +END; +--> statement-breakpoint +-- An older build gives a bot back by deleting its row; one that still holds identities stays. +CREATE TRIGGER sender_bots_holding_bd BEFORE DELETE ON sender_bots +WHEN EXISTS (SELECT 1 FROM sender_bot_identities WHERE bot_id = OLD.id) BEGIN + SELECT RAISE(IGNORE); +END; +--> statement-breakpoint +CREATE TRIGGER sender_bot_identities_identity_ad AFTER DELETE ON identities BEGIN + DELETE FROM sender_bot_identities WHERE identity_id = OLD.id; +END; +--> statement-breakpoint +CREATE TRIGGER sender_bots_emptied_ad AFTER DELETE ON sender_bot_identities +WHEN NOT EXISTS (SELECT 1 FROM sender_bot_identities WHERE bot_id = OLD.bot_id) BEGIN + DELETE FROM sender_bots WHERE id = OLD.bot_id; +END; +--> statement-breakpoint +CREATE TRIGGER sender_bots_emptied_au AFTER UPDATE OF bot_id ON sender_bot_identities +WHEN NOT EXISTS (SELECT 1 FROM sender_bot_identities WHERE bot_id = OLD.bot_id) BEGIN + DELETE FROM sender_bots WHERE id = OLD.bot_id; +END; diff --git a/drizzle/20261125111118_version-75-bot-identities-moved/snapshot.json b/drizzle/20261125111118_version-75-bot-identities-moved/snapshot.json new file mode 100644 index 000000000..f8f31912b --- /dev/null +++ b/drizzle/20261125111118_version-75-bot-identities-moved/snapshot.json @@ -0,0 +1,26615 @@ +{ + "id": "984bc74d-5e80-41a5-be86-cdaa61eb40a3", + "prevIds": [ + "91511da2-9cf8-49f9-b0de-6c6719bfa527" + ], + "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": "content_authors", + "entityType": "tables" + }, + { + "name": "content_channels", + "entityType": "tables" + }, + { + "name": "content_metrics", + "entityType": "tables" + }, + { + "name": "content_post_revisions", + "entityType": "tables" + }, + { + "name": "content_posts", + "entityType": "tables" + }, + { + "name": "content_terms", + "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_changes", + "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": "sender_bot_identities", + "entityType": "tables" + }, + { + "name": "sender_bot_moves", + "entityType": "tables" + }, + { + "name": "sender_bots", + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": "content_authors", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "email", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "network", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "handle", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "post_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "views", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "reactions", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "comments", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "shares", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "clicks", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "raw", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "post_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "version", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "reason", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "channel_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "title_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "published_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "scheduled_for", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "source_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "version", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "normalized_text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "slug", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "parent_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "tag_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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_changes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "document_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "path", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "event", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "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": true, + "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": "document_revisions", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "front_matter", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "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": "documents", + "name": "removal", + "type": "text", + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": "sender_bot_identities", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_identities", + "name": "bot_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "from_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "from_bot_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "to_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "to_bot_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "person_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": true, + "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": "content_metrics", + "name": "content_metrics_by_post_id_at", + "columns": [ + { + "value": "post_id", + "isExpression": false + }, + { + "value": "at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_post_revisions", + "name": "content_post_revisions_by_post_id_created_at", + "columns": [ + { + "value": "post_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_posts", + "name": "content_posts_by_account_id_status", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "status", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_posts", + "name": "content_posts_by_account_id_published_at", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "published_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_terms", + "name": "content_terms_by_tag_id", + "columns": [ + { + "value": "tag_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_changes", + "name": "document_changes_by_account_id_at", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "at", + "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_list_id", + "columns": [ + { + "value": "coalesce(json_extract(headers, '$.\"list-id\"'), json_extract(metadata, '$.listId'))", + "isExpression": true + } + ], + "isUnique": false, + "where": 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_chat_id_thread_external_id", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "thread_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "thread_root_id IS NULL AND thread_external_id IS NOT 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": "sender_bot_identities", + "name": "sender_bot_identities_by_bot_id", + "columns": [ + { + "value": "bot_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "sender_bot_moves", + "name": "sender_bot_moves_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "sender_bot_moves", + "name": "sender_bot_moves_by_from_person_id", + "columns": [ + { + "value": "from_person_id", + "isExpression": false + } + ], + "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_taggable_type_taggable_id", + "columns": [ + { + "value": "taggable_type", + "isExpression": false + }, + { + "value": "taggable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "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": "content_authors", + "name": "fk_content_authors_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_channels", + "name": "fk_content_channels_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_metrics", + "name": "fk_content_metrics_post_id_content_posts_id_fk", + "columns": [ + "post_id" + ], + "tableTo": "content_posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_post_revisions", + "name": "fk_content_post_revisions_post_id_content_posts_id_fk", + "columns": [ + "post_id" + ], + "tableTo": "content_posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_posts", + "name": "fk_content_posts_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_terms", + "name": "fk_content_terms_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_terms", + "name": "fk_content_terms_tag_id_canonical_tags_id_fk", + "columns": [ + "tag_id" + ], + "tableTo": "canonical_tags", + "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": "content_authors", + "name": "content_authors_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_channels", + "name": "content_channels_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_metrics", + "name": "content_metrics_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_post_revisions", + "name": "content_post_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_posts", + "name": "content_posts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_terms", + "name": "content_terms_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_changes", + "name": "document_changes_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": "sender_bot_identities", + "name": "sender_bot_identities_pk", + "columns": [ + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sender_bot_moves", + "name": "sender_bot_moves_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sender_bots", + "name": "sender_bots_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": "content_authors", + "name": "content_authors_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "content_channels", + "name": "content_channels_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "content_posts", + "name": "content_posts_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "nameExplicit": false, + "entityType": "uniques" + }, + { + "table": "content_terms", + "name": "content_terms_account_id_external_id_unique", + "columns": [ + "account_id", + "external_id" + ], + "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": "sender_bots", + "name": "sender_bots_person_id_unique", + "columns": [ + "person_id" + ], + "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" + }, + { + "table": "accounts", + "name": "accounts_settings_json", + "value": "\"settings\" IS NULL OR json_valid(\"settings\")", + "entityType": "checks" + }, + { + "table": "agent_actions", + "name": "agent_actions_target_pair", + "value": "(\"target_type\" IS NULL) = (\"target_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "attachments", + "name": "attachments_provider_ref_json", + "value": "\"provider_ref\" IS NULL OR json_valid(\"provider_ref\")", + "entityType": "checks" + }, + { + "table": "attachments", + "name": "attachments_contact_json", + "value": "\"contact\" IS NULL OR json_valid(\"contact\")", + "entityType": "checks" + }, + { + "table": "bot_updates", + "name": "bot_updates_payload_json", + "value": "\"payload\" IS NULL OR json_valid(\"payload\")", + "entityType": "checks" + }, + { + "table": "bots", + "name": "bots_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_recurrence_json", + "value": "\"recurrence\" IS NULL OR json_valid(\"recurrence\")", + "entityType": "checks" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "catalog_items", + "name": "catalog_items_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "catalog_items", + "name": "catalog_items_supplier_pair", + "value": "(\"supplier_type\" IS NULL) = (\"supplier_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "catalog_items", + "name": "catalog_items_unit_price_not_negative", + "value": "\"unit_price\" IS NULL OR \"unit_price\" >= 0", + "entityType": "checks" + }, + { + "table": "chats", + "name": "chats_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "content_authors", + "name": "content_authors_data_json", + "value": "\"data\" IS NULL OR json_valid(\"data\")", + "entityType": "checks" + }, + { + "table": "content_metrics", + "name": "content_metrics_raw_json", + "value": "\"raw\" IS NULL OR json_valid(\"raw\")", + "entityType": "checks" + }, + { + "table": "content_posts", + "name": "content_posts_data_json", + "value": "\"data\" IS NULL OR json_valid(\"data\")", + "entityType": "checks" + }, + { + "table": "content_terms", + "name": "content_terms_data_json", + "value": "\"data\" IS NULL OR json_valid(\"data\")", + "entityType": "checks" + }, + { + "table": "contracts", + "name": "contracts_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "contracts", + "name": "contracts_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "contracts", + "name": "contracts_value_not_negative", + "value": "\"value\" IS NULL OR \"value\" >= 0", + "entityType": "checks" + }, + { + "table": "crm_fields", + "name": "crm_fields_options_json", + "value": "\"options\" IS NULL OR json_valid(\"options\")", + "entityType": "checks" + }, + { + "table": "deals", + "name": "deals_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "deals", + "name": "deals_amount_not_negative", + "value": "\"amount\" IS NULL OR \"amount\" >= 0", + "entityType": "checks" + }, + { + "table": "decisions", + "name": "decisions_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "decisions", + "name": "decisions_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "document_revisions", + "name": "document_revisions_front_matter_json", + "value": "\"front_matter\" IS NULL OR json_valid(\"front_matter\")", + "entityType": "checks" + }, + { + "table": "documents", + "name": "documents_front_matter_json", + "value": "\"front_matter\" IS NULL OR json_valid(\"front_matter\")", + "entityType": "checks" + }, + { + "table": "documents", + "name": "documents_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "email_threads", + "name": "email_threads_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "emails", + "name": "emails_references_json", + "value": "\"references\" IS NULL OR json_valid(\"references\")", + "entityType": "checks" + }, + { + "table": "emails", + "name": "emails_headers_json", + "value": "\"headers\" IS NULL OR json_valid(\"headers\")", + "entityType": "checks" + }, + { + "table": "emails", + "name": "emails_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "facts", + "name": "facts_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "facts", + "name": "facts_subject_pair", + "value": "(\"subject_type\" IS NULL) = (\"subject_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "facts", + "name": "facts_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "files", + "name": "files_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_holder_pair", + "value": "(\"holder_type\" IS NULL) = (\"holder_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_counterparty_pair", + "value": "(\"counterparty_type\" IS NULL) = (\"counterparty_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "identities", + "name": "identities_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "identity_revisions", + "name": "identity_revisions_marks_json", + "value": "\"marks\" IS NULL OR json_valid(\"marks\")", + "entityType": "checks" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_amount_not_negative", + "value": "\"amount\" IS NULL OR \"amount\" >= 0", + "entityType": "checks" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_unit_price_not_negative", + "value": "\"unit_price\" IS NULL OR \"unit_price\" >= 0", + "entityType": "checks" + }, + { + "table": "invoices", + "name": "invoices_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "invoices", + "name": "invoices_issuer_pair", + "value": "(\"issuer_type\" IS NULL) = (\"issuer_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "invoices", + "name": "invoices_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "invoices", + "name": "invoices_total_not_negative", + "value": "\"total\" IS NULL OR \"total\" >= 0", + "entityType": "checks" + }, + { + "table": "leads", + "name": "leads_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "leads", + "name": "leads_amount_not_negative", + "value": "\"amount\" IS NULL OR \"amount\" >= 0", + "entityType": "checks" + }, + { + "table": "link_reviews", + "name": "link_reviews_candidates_json", + "value": "\"candidates\" IS NULL OR json_valid(\"candidates\")", + "entityType": "checks" + }, + { + "table": "link_revisions", + "name": "link_revisions_before_json", + "value": "\"before\" IS NULL OR json_valid(\"before\")", + "entityType": "checks" + }, + { + "table": "links", + "name": "links_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "mail_rules", + "name": "mail_rules_conditions_json", + "value": "\"conditions\" IS NULL OR json_valid(\"conditions\")", + "entityType": "checks" + }, + { + "table": "mail_rules", + "name": "mail_rules_actions_json", + "value": "\"actions\" IS NULL OR json_valid(\"actions\")", + "entityType": "checks" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_sessions_json", + "value": "\"sessions\" IS NULL OR json_valid(\"sessions\")", + "entityType": "checks" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "meeting_series", + "name": "meeting_series_recurrence_json", + "value": "\"recurrence\" IS NULL OR json_valid(\"recurrence\")", + "entityType": "checks" + }, + { + "table": "meeting_series", + "name": "meeting_series_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "meeting_summaries", + "name": "meeting_summaries_sections_json", + "value": "\"sections\" IS NULL OR json_valid(\"sections\")", + "entityType": "checks" + }, + { + "table": "meeting_summaries", + "name": "meeting_summaries_next_steps_json", + "value": "\"next_steps\" IS NULL OR json_valid(\"next_steps\")", + "entityType": "checks" + }, + { + "table": "meeting_summaries", + "name": "meeting_summaries_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_rows_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "meeting_transcripts", + "name": "meeting_transcripts_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "meetings", + "name": "meetings_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "memories", + "name": "memories_subject_pair", + "value": "(\"subject_type\" IS NULL) = (\"subject_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "messages", + "name": "messages_reply_to_json", + "value": "\"reply_to\" IS NULL OR json_valid(\"reply_to\")", + "entityType": "checks" + }, + { + "table": "messages", + "name": "messages_forward_json", + "value": "\"forward\" IS NULL OR json_valid(\"forward\")", + "entityType": "checks" + }, + { + "table": "messages", + "name": "messages_reactions_json", + "value": "\"reactions\" IS NULL OR json_valid(\"reactions\")", + "entityType": "checks" + }, + { + "table": "messages", + "name": "messages_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "messages", + "name": "messages_mentions_json", + "value": "\"mentions\" IS NULL OR json_valid(\"mentions\")", + "entityType": "checks" + }, + { + "table": "notes", + "name": "notes_author_pair", + "value": "(\"author_type\" IS NULL) = (\"author_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "order_lines", + "name": "order_lines_amount_not_negative", + "value": "\"amount\" IS NULL OR \"amount\" >= 0", + "entityType": "checks" + }, + { + "table": "order_lines", + "name": "order_lines_unit_price_not_negative", + "value": "\"unit_price\" IS NULL OR \"unit_price\" >= 0", + "entityType": "checks" + }, + { + "table": "orders", + "name": "orders_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "orders", + "name": "orders_supplier_pair", + "value": "(\"supplier_type\" IS NULL) = (\"supplier_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "orders", + "name": "orders_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "orders", + "name": "orders_total_not_negative", + "value": "\"total\" IS NULL OR \"total\" >= 0", + "entityType": "checks" + }, + { + "table": "organizations", + "name": "organizations_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "payments", + "name": "payments_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "payments", + "name": "payments_payer_pair", + "value": "(\"payer_type\" IS NULL) = (\"payer_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "payments", + "name": "payments_payee_pair", + "value": "(\"payee_type\" IS NULL) = (\"payee_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "payments", + "name": "payments_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "poll_votes", + "name": "poll_votes_answers_json", + "value": "\"answers\" IS NULL OR json_valid(\"answers\")", + "entityType": "checks" + }, + { + "table": "projects", + "name": "projects_owner_pair", + "value": "(\"owner_type\" IS NULL) = (\"owner_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_payload_json", + "value": "\"payload\" IS NULL OR json_valid(\"payload\")", + "entityType": "checks" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_result_json", + "value": "\"result\" IS NULL OR json_valid(\"result\")", + "entityType": "checks" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_target_pair", + "value": "(\"target_type\" IS NULL) = (\"target_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_decided_by_pair", + "value": "(\"decided_by_type\" IS NULL) = (\"decided_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "records", + "name": "records_fields_json", + "value": "\"fields\" IS NULL OR json_valid(\"fields\")", + "entityType": "checks" + }, + { + "table": "records", + "name": "records_entity_pair", + "value": "(\"entity_type\" IS NULL) = (\"entity_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "searches", + "name": "searches_params_json", + "value": "\"params\" IS NULL OR json_valid(\"params\")", + "entityType": "checks" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_amount_not_negative", + "value": "\"amount\" IS NULL OR \"amount\" >= 0", + "entityType": "checks" + }, + { + "table": "subscriptions", + "name": "subscriptions_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "subscriptions", + "name": "subscriptions_confirmed_by_pair", + "value": "(\"confirmed_by_type\" IS NULL) = (\"confirmed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "syncs", + "name": "syncs_counts_json", + "value": "\"counts\" IS NULL OR json_valid(\"counts\")", + "entityType": "checks" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_source_member_ids_json", + "value": "\"source_member_ids\" IS NULL OR json_valid(\"source_member_ids\")", + "entityType": "checks" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_survivor_member_ids_json", + "value": "\"survivor_member_ids\" IS NULL OR json_valid(\"survivor_member_ids\")", + "entityType": "checks" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_counts_json", + "value": "\"counts\" IS NULL OR json_valid(\"counts\")", + "entityType": "checks" + }, + { + "table": "taggings", + "name": "taggings_author_pair", + "value": "(\"author_type\" IS NULL) = (\"author_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "task_events", + "name": "task_events_changes_json", + "value": "\"changes\" IS NULL OR json_valid(\"changes\")", + "entityType": "checks" + }, + { + "table": "task_events", + "name": "task_events_actor_pair", + "value": "(\"actor_type\" IS NULL) = (\"actor_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "task_pairs", + "name": "task_pairs_levels_json", + "value": "\"levels\" IS NULL OR json_valid(\"levels\")", + "entityType": "checks" + }, + { + "table": "task_pairs", + "name": "task_pairs_reasons_json", + "value": "\"reasons\" IS NULL OR json_valid(\"reasons\")", + "entityType": "checks" + }, + { + "table": "task_pairs", + "name": "task_pairs_decided_by_pair", + "value": "(\"decided_by_type\" IS NULL) = (\"decided_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "tasks", + "name": "tasks_metadata_json", + "value": "\"metadata\" IS NULL OR json_valid(\"metadata\")", + "entityType": "checks" + }, + { + "table": "tasks", + "name": "tasks_closed_by_pair", + "value": "(\"closed_by_type\" IS NULL) = (\"closed_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "tasks", + "name": "tasks_close_suggested_by_pair", + "value": "(\"close_suggested_by_type\" IS NULL) = (\"close_suggested_by_id\" IS NULL)", + "entityType": "checks" + }, + { + "table": "tracker_items", + "name": "tracker_items_data_json", + "value": "\"data\" IS NULL OR json_valid(\"data\")", + "entityType": "checks" + } + ], + "renames": [] +} \ No newline at end of file diff --git a/package.json b/package.json index 15b072c57..13581f896 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "./update" ], "store": { - "speaks": 74, + "speaks": 75, "minCompatible": 73 } }, diff --git a/scripts/schema/sender-bots.mjs b/scripts/schema/sender-bots.mjs index c27ac4c71..65f66f98d 100644 --- a/scripts/schema/sender-bots.mjs +++ b/scripts/schema/sender-bots.mjs @@ -2,13 +2,13 @@ import { c, id, ts } from "./columns.mjs" const senderBotsTable = { name: "sender_bots", - doc: "A program that writes to the owner: a no-reply or alert address, a messenger bot, a service's mail. Not a person, so it is never proposed as the same person, has no ties and is no task's assignee. Its identities are those of the person row it was sorted from, which `people list` shows as `automated`. Not the `bots` table, which holds agents that work here.", + doc: "A program that writes to the owner: a no-reply or alert address, a messenger bot, a service's mail. An entity of its own beside `persons` (`sender-bot:`): it holds its identities in `sender_bot_identities`, never in `identity_links`, so it is never listed or proposed as a person, has no ties and is no task's assignee. Not the `bots` table, which holds agents that work here.", cols: [ id(), c("person_id", "integer", { notnull: true, unique: true, - note: "the person row whose identities are this bot's; its `person:` uid stays the bot's handle in lists. No foreign key: an older build erasing the person does not know this table, and a trigger drops the bot with it", + note: "kept for builds before version 75, which read a bot as this person row: negative for every bot since, so it names no person. A positive one is a bot such a build sorted after the upgrade, whose identities the next list moves here", }), c("name", "text", { note: "the owner's name for it; null shows its identities' name" }), c("organization_id", "integer", { @@ -20,6 +20,20 @@ const senderBotsTable = { ], } +const senderBotIdentitiesTable = { + name: "sender_bot_identities", + doc: "The identities a sender bot holds. An identity is here or in `identity_links`, never both: a trigger refuses its link to a person while a bot holds it, so an older build's sync gives it no person again. Its messages and mail keep pointing at the identity.", + cols: [ + c("identity_id", "integer", { + pk: true, + note: "no foreign key, as the other bot tables: an older build purging an account does not know this table, and a trigger drops the row with the identity", + }), + c("bot_id", "integer", { notnull: true, note: "the `sender_bots` row; the bot goes when its last identity does" }), + c("created_at", "integer", { notnull: true, note: "when the bot took it" }), + ], + keys: ["INDEX (bot_id)"], +} + const senderBotMovesTable = { name: "sender_bot_moves", doc: "Every move of an identity between a person and a sender bot, by the rules or by the owner. An identity whose latest move is the owner's is never moved by a rule again. A trigger drops an identity's rows with it.", @@ -37,7 +51,7 @@ const senderBotMovesTable = { c("reason", "text", { note: "the kind signals of a rule's move, or the owner's words" }), c("created_at", "integer", { notnull: true, note: "when it moved" }), ], - keys: ["INDEX (identity_id)"], + keys: ["INDEX (identity_id)", "INDEX (from_person_id)"], } -export const senderBotTables = [senderBotsTable, senderBotMovesTable] +export const senderBotTables = [senderBotsTable, senderBotIdentitiesTable, senderBotMovesTable] diff --git a/src/domain/person-kinds.ts b/src/domain/person-kinds.ts index d13b6865d..d3f5c13ea 100644 --- a/src/domain/person-kinds.ts +++ b/src/domain/person-kinds.ts @@ -23,7 +23,12 @@ export type KindSignal = | "company-name" | "no-tie" | "no-name" - | "owner-choice" + +/** + * A sender bot's reference, `sender-bot:`: a program that writes to the owner, an entity apart from people. + * `bot:` names the agents of the `bots` table. @experimental + */ +export const SENDER_BOT_PREFIX = "sender-bot:" const AUTOMATED_WORDS = new Set([ "noreply", diff --git a/src/errors/reasons.ts b/src/errors/reasons.ts index 58b39d035..428596247 100644 --- a/src/errors/reasons.ts +++ b/src/errors/reasons.ts @@ -734,9 +734,10 @@ const OTHERS: Entry[] = [ validation("identity.common-name", "more than six people have the name, so it proposes no one"), validation("identity.not-a-person", "a bot, a program or an organization is never proposed as a person by name"), validation("identity.owner", "one side is the owner's person, and only the owner joins anyone to themselves"), - ["sender-bot.not-found", "not_found", "no sender bot has that id; people list kind:automated lists them"], + ["sender-bot.not-found", "not_found", "no sender bot has that id; the bots list names them"], validation("sender-bot.owner", "the owner's own person is never a bot"), - validation("sender-bot.not-a-person", "the person named is a sender bot; name a person"), + validation("sender-bot.not-a-person", "the identity named is a sender bot's, not a person's; name a person"), + validation("sender-bot.empty", "the person or bot named holds no identity to move"), validation("sender-bot.assignee", "a sender bot is no one's assignee; move it to a person first"), validation("identity.shared-email", "more than six people share the address, so it proposes no one"), validation("identity-link.dedicated-review", "an identity link is staged and decided through the people review"), diff --git a/src/mail/sender-signals.test.ts b/src/mail/sender-signals.test.ts index b839561d3..242fbcc27 100644 --- a/src/mail/sender-signals.test.ts +++ b/src/mail/sender-signals.test.ts @@ -44,11 +44,16 @@ const synced = async (messages: FakeMail[]) => { opened.push(store) await syncMail(fakeMailSource({ messages }), store, { account: { address: ME }, since: SINCE, now: () => NOW }) const { items } = await store.people.list({ kind: "all", limit: 100 }) - return Object.fromEntries( - items + const bots = (await store.people.listBots({ limit: 100 })).items.map(({ identities, reason, reach, signals }) => [ + identities[0]?.id, + { kind: "bot", kindSignals: reason?.split(", ") ?? [], reach, signals }, + ]) + return Object.fromEntries([ + ...items .filter(({ owner }) => !owner) .map(({ email, kind, kindSignals, reach, signals }) => [email, { kind, kindSignals, reach, signals }]), - ) + ...bots, + ]) } describe("a sender's signals from mail headers", () => { @@ -71,13 +76,13 @@ describe("a sender's signals from mail headers", () => { ]) expect(people["statements@bank.example.com"]).toMatchObject({ - kind: "automated", + kind: "bot", kindSignals: ["auto-submitted"], signals: ["auto-submitted"], reach: "direct", }) expect(people["ola@forged.example.com"]).toMatchObject({ kind: "stranger", signals: [] }) - expect(people["system@hosting.example.com"]).toMatchObject({ kind: "automated", kindSignals: ["null-return-path"] }) + expect(people["system@hosting.example.com"]).toMatchObject({ kind: "bot", kindSignals: ["null-return-path"] }) expect(people["pia@office.example.com"]).toMatchObject({ kind: "stranger", signals: [] }) }) diff --git a/src/store/areas.ts b/src/store/areas.ts index 67c3b3dc1..d7ccf7148 100644 --- a/src/store/areas.ts +++ b/src/store/areas.ts @@ -43,7 +43,14 @@ export type { ProductFilter } from "./sqlite/products.js" export { PROPOSAL_STATUSES, type ProposedAction } from "./sqlite/proposed-actions.js" export type { MatchRun, RecordKey } from "./sqlite/records.js" export type { RelationListItem } from "./sqlite/relation-list.js" -export type { SenderBot } from "./sqlite/sender-bots.js" +export type { + BotIdentity, + BotList, + BotListOptions, + BotMove, + SenderBot, + SenderBotDetails, +} from "./sqlite/sender-bots.js" export type { SubscriptionFilter } from "./sqlite/subscriptions.js" export { PROJECT_TASK_FIELDS, TASK_SORTS, type TaskSort } from "./sqlite/task-board.js" export { TASK_RELATION_KINDS, type TaskRelationKind } from "./sqlite/task-relations.js" diff --git a/src/store/domain-organizations.test.ts b/src/store/domain-organizations.test.ts index 5a9c16e9a..85e7eda7a 100644 --- a/src/store/domain-organizations.test.ts +++ b/src/store/domain-organizations.test.ts @@ -146,7 +146,7 @@ it("keeps the owner's separations: a removed membership, an erased organization, await store.knowledge.removeRelation(null, String(relation?.id), "owner") const bank = Number(db.prepare("SELECT id FROM organizations WHERE name = 'Bank'").get()?.id) await store.knowledge.eraseOrganization(`organization:${bank}`, "owner", { apply: true }) - await store.people.moveToPerson(`person:${await uidOf(store, "email", "noreply@shop.ru")}`, "owner") + await store.people.moveToPerson({ provider: "email", id: "noreply@shop.ru" }, "owner") await resort(store, db) expect(memberships(db)).toEqual([]) diff --git a/src/store/index.ts b/src/store/index.ts index fb4486deb..c93cec242 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -16,7 +16,7 @@ export { TASK_TYPES, WORK_TASK_TYPES, } from "../domain/knowledge.js" -export { type KindSignal, PERSON_KINDS, type PersonKind } from "../domain/person-kinds.js" +export { type KindSignal, PERSON_KINDS, type PersonKind, SENDER_BOT_PREFIX } from "../domain/person-kinds.js" export type { RefState, RefSummary, RefSummaryKind, RefsStore } from "../domain/ref-summaries.js" export type { TagConsolidationApplyOptions, @@ -503,7 +503,14 @@ export { type SearchIndexState, searchIndexState, } from "./sqlite/search-index.js" -export type { SenderBot } from "./sqlite/sender-bots.js" +export type { + BotIdentity, + BotList, + BotListOptions, + BotMove, + SenderBot, + SenderBotDetails, +} from "./sqlite/sender-bots.js" export { REACHES, type Reach, type SenderSignal } from "./sqlite/sender-signals.js" export type { ChallengeInput, SourceReviewDecision } from "./sqlite/source-review.js" export type { diff --git a/src/store/people-list.test.ts b/src/store/people-list.test.ts index a0ba0a974..fc9e59974 100644 --- a/src/store/people-list.test.ts +++ b/src/store/people-list.test.ts @@ -264,6 +264,8 @@ describe("the kind of a person", () => { .filter(({ owner }) => !owner) .map(({ displayName, kind, kindSignals }) => [displayName, [kind, ...kindSignals]]), ) + const bots = async (store: MessageStore) => + (await store.people.listBots({ limit: 100 })).items.map(({ displayName, reason }) => [displayName, reason]) it("puts programs under automated and companies under organization, even with a tie", async () => { const { store, db } = await opened() @@ -288,15 +290,18 @@ describe("the kind of a person", () => { ]) expect(await kinds(store)).toEqual({ - "Weather Bot": ["automated", "bot"], "CZECH AIRLINES": ["organization", "company-name"], "Уведомления Госуслуг": ["automated", "automated-name"], "ООО «Ромашка»": ["organization", "company-name"], Kai: ["person", "chat"], - Orders: ["automated", "no-reply"], Reception: ["organization", "organization", "role-address"], "Mia Holt": ["stranger", "no-tie"], }) + // Programs are bots, apart from people: a messenger's bot flag holds through a chat both wrote in. + expect(await bots(store)).toEqual([ + ["Orders", "no-reply"], + ["Weather Bot", "bot"], + ]) }) it("calls a no-reply or notification address automated by any part of it, unless they answer in a chat", async () => { @@ -320,12 +325,14 @@ describe("the kind of a person", () => { await answered(store, TG, "8") expect(await kinds(store)).toEqual({ - "Ada Bank": ["automated", "no-reply"], - "Bo Shop": ["automated", "no-reply"], - "Cy App": ["automated", "notification-address"], "Joe Club": ["stranger", "no-tie"], "Lu Park": ["person", "chat"], }) + expect(await bots(store)).toEqual([ + ["Ada Bank", "no-reply"], + ["Bo Shop", "no-reply"], + ["Cy App", "notification-address"], + ]) }) it("calls a sender automated when most of their mail went to the bulk box", async () => { diff --git a/src/store/people.ts b/src/store/people.ts index 39ae4277e..93758a270 100644 --- a/src/store/people.ts +++ b/src/store/people.ts @@ -37,6 +37,7 @@ import { type PeopleListOptions, type SimilarPerson, similarPeople, + storeKinds, } from "./sqlite/people-list.js" import { type KeptPerson, @@ -58,7 +59,16 @@ import { type ShownBecause, shownReasons } from "./sqlite/person-ties.js" import type { PrivateContact, PrivateContactNote } from "./sqlite/private-people.js" import * as privatePeople from "./sqlite/private-people.js" import type { ProposedAction } from "./sqlite/proposed-actions.js" -import { moveToBot, moveToPerson, type SenderBot, senderBotsOf } from "./sqlite/sender-bots.js" +import { + type BotList, + type BotListOptions, + listBots, + moveToBot, + moveToPerson, + type SenderBot, + type SenderBotDetails, + showBot, +} from "./sqlite/sender-bots.js" import { write } from "./sqlite/transaction.js" import type { AccountKey, @@ -234,13 +244,22 @@ export interface PeopleStore extends AccountPeople { counts(query?: string): Promise> /** People whose names start like the typed one, the same name first: for a form that adds a person. */ similar(name: string, options?: { limit?: number }): Promise - /** Why each `person:` is shown by default, as `list` gives it; an empty list for one with no tie, or a bot. */ + /** Why each `person:` is shown by default, as `list` gives it; an empty list for one with no tie. */ ties(people: readonly string[]): Promise> /** - * The owner says a sender is a program: a person (`person:`) or one identity moves to a sender bot for its - * whole history, listed as `automated` under its person row's ref, and no rule moves it back. One identity of a person - * with others gets a person row of its own; `bot` (`sender-bot:`) joins a stored bot instead. The owner's alone; - * refused for the owner's own person. + * The sender bots: programs that write to the owner, apart from people (`sender-bot:`), by name. `query` looks in + * their names, addresses and usernames; `organization` (`organization:`) keeps the ones that send for it. + * @experimental + */ + listBots(options: BotListOptions): Promise + /** One sender bot (`sender-bot:`), its identities and every move to or from it. @experimental */ + showBot(bot: string): Promise + /** + * The owner says a sender is a program: a person (`person:`), a bot (`sender-bot:`) or one identity moves + * to a sender bot for its whole history, and no rule gives it back. Its messages keep pointing at the identity. `bot` + * joins a stored bot; else a bot already holding it keeps it, or a new one takes it. A person every identity left is + * hidden from lists, and a move back gives their uid back. The owner's alone; refused for the owner's own person. + * @experimental */ moveToBot( subject: string | IdentityRef, @@ -248,9 +267,9 @@ export interface PeopleStore extends AccountPeople { options?: { bot?: string; name?: string; reason?: string }, ): Promise /** - * The owner says a sender is a person: a bot (`sender-bot:` or its `person:`), or one identity of it, moves - * to a person for its whole history, and no rule makes it a bot again. Said of a person who is no bot, it keeps them - * a person. `person` joins that person instead. The owner's alone. + * The owner says a sender is a person: a bot (`sender-bot:`) or one identity of it moves to a person for its + * whole history, and no rule makes it a bot again. `person` takes it; else each identity goes back to the person it + * came from, or a person of its own. Said of a person, it keeps them one. The owner's alone. @experimental */ moveToPerson( subject: string | IdentityRef, @@ -416,14 +435,13 @@ export const peopleStoreOver = (context: StoreContext, keyed: AccountPeople): Pe similar: async (name, { limit = 8 } = {}) => similarPeople(database, name, limit), ties: async (people) => { const reasons = shownReasons(database) - const bots = senderBotsOf(database) - return Object.fromEntries( - people.map((ref) => { - const id = Number(ref.replace(/^person:/, "")) - return [ref, bots.has(id) ? [] : (reasons.get(id) ?? [])] - }), - ) + return Object.fromEntries(people.map((ref) => [ref, reasons.get(Number(ref.replace(/^person:/, ""))) ?? []])) + }, + listBots: async (options) => { + storeKinds(database) + return listBots(database, options) }, + showBot: async (bot) => showBot(database, bot), moveToBot: async (subject, by, options) => { ownerOnly(by, "moves a sender to a bot") return moveToBot(context, subject, options) diff --git a/src/store/person-match-scan.test.ts b/src/store/person-match-scan.test.ts index 4c122bd0b..f29194558 100644 --- a/src/store/person-match-scan.test.ts +++ b/src/store/person-match-scan.test.ts @@ -713,7 +713,7 @@ describe("the same name on a bot, a program or a company", () => { "AND external_id = ? ON CONFLICT DO UPDATE SET mail_signals = excluded.mail_signals", ) .run(account, id) - expect((await store.people.list({ limit: 10, kind: "automated" })).total).toBe(4) + expect((await store.people.listBots({ limit: 10 })).total).toBe(4) await store.people.scanMatches() expect(await nameProposals(store)).toEqual([]) @@ -721,9 +721,8 @@ describe("the same name on a bot, a program or a company", () => { const scan = await store.people.scanMatches({ full: true }) expect(await nameProposals(store)).toEqual([]) - expect(scan.skipped).toEqual( - expect.arrayContaining([expect.objectContaining({ signal: "name", reason: "identity.not-a-person" })]), - ) + // A bot's identities sit on no person, so no scan sees them. + expect(scan.proposed).toEqual([]) }) it("never proposes a bot or an organization, and still proposes two people of that name", async () => { diff --git a/src/store/sender-bots.test.ts b/src/store/sender-bots.test.ts index 7a603da65..3c0d5943a 100644 --- a/src/store/sender-bots.test.ts +++ b/src/store/sender-bots.test.ts @@ -2,10 +2,8 @@ import { mkdtempSync } from "node:fs" import { tmpdir } from "node:os" import { join } from "node:path" import { afterEach, expect, it } from "vitest" -import { rollBackTo } from "../testing/older-store.js" import type { CacheDatabase } from "./driver.js" import { openCache } from "./open.js" -import { LIST_SENDERS } from "./sqlite/sender-signals.js" import { type AccountKey, type MessageStore, openStore } from "./store.js" const TG: AccountKey = { provider: "telegram", account: "1" } @@ -31,18 +29,22 @@ const opened = async (path = join(mkdtempSync(join(tmpdir(), "sender-bots-")), " const uidOf = async (store: MessageStore, provider: string, id: string) => `person:${(await store.people.personOf({ provider, id }))?.uid}` -const automated = async (store: MessageStore) => - (await store.people.list({ limit: 100, kind: "automated" })).items.map(({ person, displayName, bot, ties }) => ({ - person, +const people = async (store: MessageStore) => + (await store.people.list({ limit: 100, kind: "all" })).items.map(({ displayName }) => displayName) + +const bots = async (store: MessageStore) => + (await store.people.listBots({ limit: 100 })).items.map(({ displayName, identities, author }) => ({ displayName, - bot, - ties, + identities: identities.map(({ provider, id }) => `${provider}:${id}`), + author, })) const moves = (db: CacheDatabase) => db.prepare("SELECT from_person_id, from_bot_id, to_person_id, to_bot_id, author, reason FROM sender_bot_moves").all() -it("moves a program's address to a bot, lists it as automated under its person ref, and a sync keeps it there", async () => { +const count = (db: CacheDatabase, sql: string) => Number(db.prepare(sql).get()?.n) + +it("gives a program's identities to a bot of its own, apart from people, and a sync gives it no person again", async () => { const { store, db } = await opened() await store.people.savePeople(MAIL, [ { id: "noreply-4471@bank.ru", name: "Bank" }, @@ -53,113 +55,114 @@ it("moves a program's address to a bot, lists it as automated under its person r { id: "51", name: "Weather Notifications" }, ]) const bank = await uidOf(store, "email", "noreply-4471@bank.ru") - const helper = await uidOf(store, "telegram", "50") - const listed = await automated(store) + const listed = await people(store) - expect(listed).toEqual( - expect.arrayContaining([ - { person: bank, displayName: "Bank", bot: expect.stringMatching(/^sender-bot:\d+$/), ties: [] }, - { person: helper, displayName: "Helper", bot: expect.stringMatching(/^sender-bot:\d+$/), ties: [] }, - // A name alone may be a human's newsletter: marked, not moved. - { person: await uidOf(store, "telegram", "51"), displayName: "Weather Notifications", bot: null, ties: [] }, - ]), - ) - expect(listed).toHaveLength(3) + // A name alone may be a human's newsletter: marked, not moved. + expect(listed).toEqual(expect.arrayContaining(["Lena Marsh", "Weather Notifications"])) + expect(listed).not.toContain("Bank") + expect(listed).not.toContain("Helper") + expect(await bots(store)).toEqual([ + { displayName: "Bank", identities: ["email:noreply-4471@bank.ru"], author: "rules" }, + { displayName: "Helper", identities: ["telegram:50"], author: "rules" }, + ]) + expect(await store.people.personOf({ provider: "email", id: "noreply-4471@bank.ru" })).toBeUndefined() + await expect( + store.people.linkIdentities( + { provider: "email", id: "lena@acme.ru" }, + { provider: "email", id: "noreply-4471@bank.ru" }, + { method: "manual", by: "owner" }, + ), + ).rejects.toMatchObject({ + details: { reason: "sender-bot.not-a-person" }, + }) expect(moves(db)).toEqual( expect.arrayContaining([expect.objectContaining({ author: "rules", reason: "no-reply", to_person_id: null })]), ) - const before = db.prepare("SELECT id, person_id, author FROM sender_bots ORDER BY id").all() + const persons = count(db, "SELECT count(*) AS n FROM persons") await store.people.savePeople(MAIL, [{ id: "noreply-4471@bank.ru", name: "Bank" }]) await store.people.savePeople(TG, [{ id: "50", name: "Helper", isBot: true }]) - expect(await automated(store)).toEqual(listed) - expect(db.prepare("SELECT id, person_id, author FROM sender_bots ORDER BY id").all()).toEqual(before) - expect((await store.people.list({ limit: 0, kind: "automated" })).counts.automated).toBe(3) + expect(count(db, "SELECT count(*) AS n FROM persons")).toBe(persons) + expect(await bots(store)).toHaveLength(2) + expect((await store.people.list({ limit: 0, kind: "automated" })).counts.automated).toBe(1) expect(await store.people.ties([bank])).toEqual({ [bank]: [] }) expect((await store.people.similar("Bank")).map(({ person }) => person)).not.toContain(bank) + // The person ref a reader kept from before still names the bot, and a move back gives it back. + expect(`person:${(await store.people.moveToPerson(bank, "owner")).uid}`).toBe(bank) + expect(await people(store)).toContain("Bank") }) -it("keeps the owner's choice both ways, through the rules and a change of them, and logs each move", async () => { +it("keeps the owner's choice both ways, through the rules and a change of them, and gives the uid back", async () => { const { store, db } = await opened() await store.people.savePeople(MAIL, [ - { id: "alerts@shop.ru", name: "Shop" }, + { id: "mark@shop.ru", name: "Shop" }, { id: "noreply@bank.ru", name: "Bank" }, ]) - const shop = await uidOf(store, "email", "alerts@shop.ru") - const bank = await uidOf(store, "email", "noreply@bank.ru") + const shop = await uidOf(store, "email", "mark@shop.ru") await store.people.list({ limit: 0 }) await expect(store.people.moveToBot(shop, { bot: "agent", reason: "guess" })).rejects.toMatchObject({ details: { reason: "identity.owner-only" }, }) const shopBot = await store.people.moveToBot(shop, "owner", { name: "Shop alerts", reason: "a program" }) - const bankPerson = await store.people.moveToPerson(bank, "owner", { reason: "my banker writes from it" }) + const bankPerson = await store.people.moveToPerson({ provider: "email", id: "noreply@bank.ru" }, "owner", { + reason: "my banker writes from it", + }) db.prepare("UPDATE store_settings SET value = '6' WHERE key = 'people.kind_rules'").run() - expect(shopBot).toMatchObject({ person: shop, name: "Shop alerts", author: "owner" }) - expect(await automated(store)).toEqual([{ person: shop, displayName: "Shop alerts", bot: shopBot.bot, ties: [] }]) - expect(bankPerson.uid).toBe(bank.replace("person:", "")) - const listed = (await store.people.list({ limit: 100, kind: "all" })).items.find(({ person }) => person === bank) - expect(listed).toMatchObject({ kind: "organization", bot: null }) + expect(shopBot).toMatchObject({ name: "Shop alerts", displayName: "Shop alerts", author: "owner" }) + expect(await store.people.showBot(shopBot.bot)).toMatchObject({ + identities: [{ provider: "email", id: "mark@shop.ru" }], + moves: [{ identity: { provider: "email", id: "mark@shop.ru" }, from: shop, to: shopBot.bot, author: "owner" }], + }) + expect(await people(store)).toEqual(["Me", "Bank"]) + expect(await bots(store)).toEqual([ + { displayName: "Shop alerts", identities: ["email:mark@shop.ru"], author: "owner" }, + ]) const back = await store.people.moveToPerson(shopBot.bot, "owner") expect(`person:${back.uid}`).toBe(shop) - expect(await automated(store)).toEqual([]) - expect(db.prepare("SELECT count(*) AS n FROM sender_bots").get()).toEqual({ n: 0 }) - expect( - moves(db) - .filter(({ author }) => author === "owner") - .map(({ to_bot_id, to_person_id }) => [to_bot_id !== null, to_person_id !== null]), - ).toEqual([ - [true, false], - [false, true], - [false, true], - ]) + expect(`person:${bankPerson.uid}`).toBe(await uidOf(store, "email", "noreply@bank.ru")) + expect(await bots(store)).toEqual([]) + expect(count(db, "SELECT count(*) AS n FROM sender_bots")).toBe(0) + expect(await people(store)).toEqual(expect.arrayContaining(["Shop", "Bank"])) await expect(store.people.moveToBot("person:1", "owner")).rejects.toMatchObject({ details: { reason: "sender-bot.owner" }, }) }) -it("moves one identity of a person with others to a bot of its own, and into a bot already stored", async () => { - const { store } = await opened() +it("moves one identity of a person with others to a bot, and another into the same bot, with no person row", async () => { + const { store, db } = await opened() await store.people.savePeople(TG, [ { id: "60", name: "Ola" }, { id: "61", name: "Ola" }, { id: "62", name: "Ola" }, ]) - await store.people.linkIdentities( - { provider: "telegram", id: "60" }, - { provider: "telegram", id: "61" }, - { method: "manual", by: "owner" }, - ) - await store.people.linkIdentities( - { provider: "telegram", id: "60" }, - { provider: "telegram", id: "62" }, - { method: "manual", by: "owner" }, - ) + for (const id of ["61", "62"]) + await store.people.linkIdentities( + { provider: "telegram", id: "60" }, + { provider: "telegram", id }, + { method: "manual", by: "owner" }, + ) const ola = await uidOf(store, "telegram", "60") + const persons = count(db, "SELECT count(*) AS n FROM persons") const bot = await store.people.moveToBot({ provider: "telegram", id: "61" }, "owner") const joined = await store.people.moveToBot({ provider: "telegram", id: "62" }, "owner", { bot: bot.bot }) expect(joined.bot).toBe(bot.bot) - expect(bot.person).not.toBe(ola) + expect(joined.identities.map(({ id }) => id)).toEqual(["61", "62"]) expect(await uidOf(store, "telegram", "60")).toBe(ola) - expect(await uidOf(store, "telegram", "61")).toBe(bot.person) - expect(await uidOf(store, "telegram", "62")).toBe(bot.person) - expect((await automated(store)).map(({ person }) => person)).toEqual([bot.person]) - await expect( - store.people.moveToPerson({ provider: "telegram", id: "61" }, "owner", { person: bot.person }), - ).rejects.toMatchObject({ details: { reason: "sender-bot.not-a-person" } }) + expect(count(db, "SELECT count(*) AS n FROM persons")).toBe(persons) const home = await store.people.moveToPerson({ provider: "telegram", id: "61" }, "owner", { person: ola }) expect(`person:${home.uid}`).toBe(ola) - expect(await uidOf(store, "telegram", "62")).toBe(bot.person) + expect((await store.people.showBot(bot.bot)).identities.map(({ id }) => id)).toEqual(["62"]) }) -it("never joins a bot to a person by an address, nor makes it a task's assignee", async () => { +it("never joins a bot to a person by an address, nor makes the person it left a task's assignee", async () => { const { store, db } = await opened() await store.people.savePeople(CRM, [{ id: "contact/20", name: "Alice Example", email: "alice@acme.example" }]) await store.people.savePeople(TG, [{ id: "5", name: "Alice" }]) @@ -171,9 +174,8 @@ it("never joins a bot to a person by an address, nor makes it a task's assignee" const scan = await store.people.scanMatches() - expect(await uidOf(store, "telegram", "5")).toBe(tg) expect(scan.merged).toEqual([]) - expect(scan.skipped).toEqual(expect.arrayContaining([expect.objectContaining({ reason: "identity.not-a-person" })])) + expect(await store.people.personOf({ provider: "telegram", id: "5" })).toBeUndefined() await store.knowledge.addProject({ name: "Harbour", key: "HRB", type: "work" }) const task = await store.tasks.create({ project: "HRB", title: "Ship", type: "chore" }, "owner") await expect(store.tasks.assign(task.id, { to: tg, role: "assignee" }, "owner")).rejects.toMatchObject({ @@ -181,39 +183,11 @@ it("never joins a bot to a person by an address, nor makes it a task's assignee" }) }) -it("gives a version 73 store the bot tables and the List-Id index, and moves its programs on the next list", async () => { - const { store, path } = await opened() - await store.people.savePeople(MAIL, [{ id: "no-reply@service.ru", name: "Service" }]) - await store.people.list({ limit: 0 }) - await store.close() - handles.splice(handles.indexOf(store), 1) - const old = await openCache(path) - rollBackTo(old, 74) - old.prepare("UPDATE store_settings SET value = '6' WHERE key = 'people.kind_rules'").run() - expect(old.prepare("SELECT 1 FROM sqlite_master WHERE name = 'sender_bots'").get()).toBeUndefined() - old.close() - - const upgraded = await openStore({ path }) - handles.push(upgraded) - const service = await uidOf(upgraded, "email", "no-reply@service.ru") - - expect((await automated(upgraded)).map(({ person, bot }) => [person, bot?.startsWith("sender-bot:")])).toEqual([ - [service, true], - ]) - const db = await openCache(path) - handles.push(db) - const plan = db - .prepare(`EXPLAIN QUERY PLAN ${LIST_SENDERS}`) - .all('[""]') - .map((row) => String(row.detail)) - expect(plan.join(" ")).toContain("emails_by_list_id") -}) - -it("gives a rule's bot back to a person once the owner writes to it, and logs the rule's move", async () => { +it("gives a rule's bot back to the person it came from once the owner writes to it", async () => { const { store, db } = await opened() await store.people.savePeople(MAIL, [{ id: "noreply@bank.ru", name: "Bank" }]) const bank = await uidOf(store, "email", "noreply@bank.ru") - expect((await automated(store)).map(({ person }) => person)).toEqual([bank]) + expect(await bots(store)).toHaveLength(1) const account = Number(db.prepare("SELECT id FROM accounts WHERE provider = 'email'").get()?.id) const at = Date.now() const thread = db @@ -232,10 +206,13 @@ it("gives a rule's bot back to a person once the owner writes to it, and logs th "INSERT INTO email_recipients (email_id, identity_id, address, role, position, created_at, updated_at) " + "VALUES (?, ?, 'noreply@bank.ru', 'to', 0, ?, ?)", ).run(sent, identity, at, at) + db.prepare("UPDATE persons SET kind = NULL WHERE owner = 1").run() + expect(await bots(store)).toEqual([]) + expect(await uidOf(store, "email", "noreply@bank.ru")).toBe(bank) + const listed = (await store.people.list({ limit: 10, kind: "automated" })).items // Still marked by its address, but the owner wrote to it: a person, not a bot. - expect(await automated(store)).toEqual([{ person: bank, displayName: "Bank", bot: null, ties: ["mail"] }]) - expect(db.prepare("SELECT count(*) AS n FROM sender_bots").get()).toEqual({ n: 0 }) + expect(listed.map(({ person, ties }) => ({ person, ties }))).toEqual([{ person: bank, ties: ["mail"] }]) expect( moves(db).map(({ author, to_bot_id, to_person_id }) => [author, to_bot_id !== null, to_person_id !== null]), ).toEqual([ @@ -244,28 +221,26 @@ it("gives a rule's bot back to a person once the owner writes to it, and logs th ]) }) -it("lets an account purge and a person's erasure take a bot's rows with them", async () => { +it("lets an account purge take a bot's rows with its identities", async () => { const { store, db } = await opened() await store.people.savePeople(TG, [ { id: "50", name: "Helper", isBot: true }, { id: "51", name: "Notifier", isBot: true }, ]) - await store.people.list({ limit: 0 }) - expect(db.prepare("SELECT count(*) AS n FROM sender_bots").get()).toEqual({ n: 2 }) + expect(await bots(store)).toHaveLength(2) - await store.people.erase(await uidOf(store, "telegram", "51"), "owner", { apply: true }) - expect(db.prepare("SELECT count(*) AS n FROM sender_bots").get()).toEqual({ n: 1 }) await store.accounts.purge(TG) - expect(db.prepare("SELECT count(*) AS n FROM sender_bots").get()).toEqual({ n: 0 }) - expect(db.prepare("SELECT count(*) AS n FROM sender_bot_moves").get()).toEqual({ n: 0 }) + expect(count(db, "SELECT count(*) AS n FROM sender_bots")).toBe(0) + expect(count(db, "SELECT count(*) AS n FROM sender_bot_identities")).toBe(0) + expect(count(db, "SELECT count(*) AS n FROM sender_bot_moves")).toBe(0) }) -it("never proposes a bot as the same person by name", async () => { +it("never proposes the person a bot left as the same person by name", async () => { const { store } = await opened() await store.people.savePeople(MAIL, [{ id: "noreply@lane.ru", name: "Pat Lane" }]) - await store.people.savePeople(TG, [{ id: "70", name: "Pat Lane" }]) const bot = await uidOf(store, "email", "noreply@lane.ru") + await store.people.savePeople(TG, [{ id: "70", name: "Pat Lane" }]) await store.people.list({ limit: 0 }) const scan = await store.people.scanMatches({ full: true }) @@ -275,5 +250,23 @@ it("never proposes a bot as the same person by name", async () => { ...scan.proposed.flatMap((one) => one.persons), ] expect(named).not.toContain(bot.replace("person:", "")) - expect(await uidOf(store, "email", "noreply@lane.ru")).toBe(bot) +}) + +it("finds bots by name and address and by the organization of their domain", async () => { + const { store } = await opened() + await store.people.savePeople(MAIL, [ + { id: "noreply@mail.bank.ru", name: "Bank" }, + { id: "alerts@shop.ru", name: "Shop" }, + ]) + const all = await store.people.listBots({ limit: 1 }) + const [bank] = (await store.people.listBots({ limit: 10, query: "bank.ru" })).items + + expect(all).toMatchObject({ total: 2, hasMore: true }) + expect(bank).toMatchObject({ displayName: "Bank", organization: expect.stringMatching(/^organization:\d+$/) }) + expect( + (await store.people.listBots({ limit: 10, organization: String(bank?.organization) })).items.map(({ bot }) => bot), + ).toEqual([bank?.bot]) + await expect(store.people.listBots({ limit: 10, query: "ba" })).rejects.toMatchObject({ + details: { reason: "query.short-text" }, + }) }) diff --git a/src/store/sqlite/domain-organizations.ts b/src/store/sqlite/domain-organizations.ts index b2a15cc10..048c41a4a 100644 --- a/src/store/sqlite/domain-organizations.ts +++ b/src/store/sqlite/domain-organizations.ts @@ -52,13 +52,14 @@ export const companyDomainOf = (address: string): string | undefined => { } /** - * A person as the kind pass leaves them: `holds` for a bot or a shared mailbox, whose addresses the organization owns; - * never for one the owner kept as a person. + * A person or a sender bot (`bot`, its `sender_bots` id) as the kind pass leaves them: `holds` for a bot or a shared + * mailbox, whose addresses the organization owns; never for one the owner kept as a person. */ export interface Sorted { id: number displayName: string | null holds: boolean + bot?: boolean } const nameFor = (shown: string | null, domain: string): string => { @@ -70,19 +71,28 @@ const nameFor = (shown: string | null, domain: string): string => { : domain } -const mailOf = (database: CacheDatabase, people: readonly number[]) => { - const found = new Map() - for (const row of database - .prepare( - "SELECT l.person_id AS person, i.id, lower(i.external_id) AS address FROM identity_links l " + - "JOIN identities i ON i.id = l.identity_id WHERE i.provider = 'email' " + - "AND l.person_id IN (SELECT value FROM json_each(?)) ORDER BY i.id", - ) - .all(JSON.stringify(people))) { - const domain = companyDomainOf(String(row.address)) - if (domain === undefined) continue - const person = Number(row.person) - found.set(person, [...(found.get(person) ?? []), { identity: Number(row.id), domain }]) +const keyOf = (one: Sorted) => `${one.bot ? "bot" : "person"}:${one.id}` + +const mailOf = (database: CacheDatabase, sorted: readonly Sorted[]) => { + const found = new Map() + const held = [ + { prefix: "person", sql: "SELECT l.person_id AS holder, l.identity_id FROM identity_links l" }, + { prefix: "bot", sql: "SELECT l.bot_id AS holder, l.identity_id FROM sender_bot_identities l" }, + ] + for (const { prefix, sql } of held) { + const ids = sorted.filter((one) => (prefix === "bot") === (one.bot === true)).map(({ id }) => id) + if (ids.length === 0) continue + for (const row of database + .prepare( + `SELECT h.holder, i.id, lower(i.external_id) AS address FROM (${sql}) h JOIN identities i ON i.id = h.identity_id ` + + "WHERE i.provider = 'email' AND h.holder IN (SELECT value FROM json_each(?)) ORDER BY i.id", + ) + .all(JSON.stringify(ids))) { + const domain = companyDomainOf(String(row.address)) + if (domain === undefined) continue + const key = `${prefix}:${Number(row.holder)}` + found.set(key, [...(found.get(key) ?? []), { identity: Number(row.id), domain }]) + } } return found } @@ -137,7 +147,6 @@ const othersAt = (database: CacheDatabase, domains: ReadonlySet, seen: R "SELECT l.person_id AS person, i.id, lower(i.external_id) AS address FROM identity_links l " + "JOIN identities i ON i.id = l.identity_id JOIN persons p ON p.id = l.person_id " + "WHERE i.provider = 'email' AND p.owner = 0 AND p.kind IS NOT NULL AND p.kind NOT IN ('test', 'merged') " + - "AND NOT EXISTS (SELECT 1 FROM sender_bots b WHERE b.person_id = p.id) " + "AND NOT EXISTS (SELECT 1 FROM organization_identities oi WHERE oi.identity_id = i.id) ORDER BY i.id", ) .all()) { @@ -151,17 +160,14 @@ const othersAt = (database: CacheDatabase, domains: ReadonlySet, seen: R } /** - * Plan step 5: a bot or a shared mailbox at a company domain joins that domain's organization, made when none holds + * Plan step 5: a sender bot or a shared mailbox at a company domain joins that domain's organization, made when none holds * it; a human there becomes a `member-of` it, never merged. Free mail, throwaway mail and sending platforms make none. * An organization holding a domain of the built-in Wikidata list gets its `metadata.sector`. * The owner's word holds: a membership the owner removed and a domain whose organization the owner erased are not made * again. The caller holds the write lock. */ export const groupByDomain = (database: CacheDatabase, people: readonly Sorted[], at: number): void => { - const mail = mailOf( - database, - people.map(({ id }) => id), - ) + const mail = mailOf(database, people) if (mail.size === 0) return const { byDomain, held } = holdersOf(database) const refused = refusedDomains(database) @@ -175,7 +181,7 @@ export const groupByDomain = (database: CacheDatabase, people: readonly Sorted[] `VALUES (?, ?, '${BY_DOMAIN}', 'rules', ?, ?) ON CONFLICT (identity_id, organization_id) DO NOTHING`, ) const sends = database.prepare( - "UPDATE sender_bots SET organization_id = ?, updated_at = ? WHERE person_id = ? AND organization_id IS NULL", + "UPDATE sender_bots SET organization_id = ?, updated_at = ? WHERE id = ? AND organization_id IS NULL", ) const holder = (domain: string): number | undefined => { const found = byDomain.get(domain) @@ -183,7 +189,7 @@ export const groupByDomain = (database: CacheDatabase, people: readonly Sorted[] } for (const person of people) { if (!person.holds) continue - for (const { identity, domain } of mail.get(person.id) ?? []) { + for (const { identity, domain } of mail.get(keyOf(person)) ?? []) { let organization = held.get(identity) if (organization === undefined) { if ((byDomain.get(domain)?.size ?? 0) > 1) continue @@ -197,7 +203,7 @@ export const groupByDomain = (database: CacheDatabase, people: readonly Sorted[] hold.run(identity, organization, at, at) held.set(identity, organization) } - sends.run(organization, at, person.id) + if (person.bot) sends.run(organization, at, person.id) } } const removed = removedMemberships(database) @@ -215,8 +221,9 @@ export const groupByDomain = (database: CacheDatabase, people: readonly Sorted[] member.run(person, organization, `writes from ${domain}`, at, at, person, organization) } } - const seen = new Set(people.map(({ id }) => id)) - for (const person of people) if (!person.holds) join(person.id, mail.get(person.id) ?? []) + const humans = people.filter((one) => !one.bot) + const seen = new Set(humans.map(({ id }) => id)) + for (const person of humans) if (!person.holds) join(person.id, mail.get(keyOf(person)) ?? []) if (created.size > 0) for (const [person, addresses] of othersAt(database, created, seen)) join(person, addresses) setSectors(database, byDomain, at) } diff --git a/src/store/sqlite/identities.ts b/src/store/sqlite/identities.ts index cc867924b..dbb41041f 100644 --- a/src/store/sqlite/identities.ts +++ b/src/store/sqlite/identities.ts @@ -23,6 +23,7 @@ import { identityRevisions, messages, persons, + senderBotIdentities, } from "./schema.js" import { trigramPart } from "./trigram-match.js" import { toIso } from "./values.js" @@ -141,12 +142,23 @@ const revise = (orm: Orm, identity: number, next: Profile, at: number, before?: return last !== undefined } -/** A new identity's own person, as ingest gives every identity; one already linked keeps its person. */ +/** + * A new identity's own person, as ingest gives every identity; one already linked keeps its person, and a sender + * bot's has none. + */ export const ensurePerson = (orm: Orm, identity: number, name: string | null, at: number): void => { if ( orm.select({ id: identityLinks.identityId }).from(identityLinks).where(eq(identityLinks.identityId, identity)).get() ) return + if ( + orm + .select({ id: senderBotIdentities.identityId }) + .from(senderBotIdentities) + .where(eq(senderBotIdentities.identityId, identity)) + .get() + ) + return const person = Number( orm.insert(persons).values({ name, createdAt: at, updatedAt: at }).returning({ pk: persons.id }).get()?.pk, ) diff --git a/src/store/sqlite/manifest.ts b/src/store/sqlite/manifest.ts index a99c6dd70..61685962c 100644 --- a/src/store/sqlite/manifest.ts +++ b/src/store/sqlite/manifest.ts @@ -270,6 +270,8 @@ export const MANIFEST: ManifestEntry[] = [ { name: "20261123230507_version-73-autoincrement", version: 73, minCompatible: 73, tables: V73_TABLES }, { name: "20261125025700_version-74-sender-bots", version: 74, minCompatible: 73 }, { name: "20261125025709_version-74-sender-bot-triggers", version: 74, minCompatible: 73 }, + { name: "20261125111113_version-75-bot-identities", version: 75, minCompatible: 73 }, + { name: "20261125111118_version-75-bot-identities-moved", version: 75, minCompatible: 73 }, ] export const generatedMigrations = ( diff --git a/src/store/sqlite/merged-persons.ts b/src/store/sqlite/merged-persons.ts index a042cba04..362459e23 100644 --- a/src/store/sqlite/merged-persons.ts +++ b/src/store/sqlite/merged-persons.ts @@ -22,12 +22,14 @@ export const mergeSql = (event: string): string => `AND w.id > ${event}.id))))` /** - * A person every identity left by a merge, so another person holds them now. The row stays so that undoing the merge - * gives the uid back; a person added by name has no identity and no move, and stays visible. + * A person every identity left by a merge or a move to a sender bot, so another person or a bot holds them now. The + * row stays so that undoing the merge or the move gives the uid back; a person added by name has no identity and no + * move, and stays visible. */ export const mergedAwaySql = (person: string): string => `(${person}.owner = 0 AND NOT EXISTS (SELECT 1 FROM identity_links ml WHERE ml.person_id = ${person}.id) ` + - `AND EXISTS (SELECT 1 FROM identity_link_events me WHERE me.from_person_id = ${person}.id AND ${mergeSql("me")}))` + `AND (EXISTS (SELECT 1 FROM identity_link_events me WHERE me.from_person_id = ${person}.id AND ${mergeSql("me")}) ` + + `OR EXISTS (SELECT 1 FROM sender_bot_moves mb WHERE mb.from_person_id = ${person}.id AND mb.to_bot_id IS NOT NULL)))` const LATEST_MOVE = (person: string) => `(SELECT e.to_person_id FROM identity_link_events e WHERE e.from_person_id = ${person}.id AND ${mergeSql("e")} diff --git a/src/store/sqlite/migrations.generated.ts b/src/store/sqlite/migrations.generated.ts index 9a16f4a5e..fe17fd906 100644 --- a/src/store/sqlite/migrations.generated.ts +++ b/src/store/sqlite/migrations.generated.ts @@ -2114,5 +2114,31 @@ export const GENERATED: { name: string; statements: string[] }[] = [ "CREATE TRIGGER person_kind_sender_bot_au AFTER UPDATE OF person_id, author, name ON sender_bots BEGIN\n UPDATE persons SET kind = NULL WHERE kind IS NOT NULL AND id IN (OLD.person_id, NEW.person_id);\nEND;", "CREATE TRIGGER person_kind_sender_bot_move_ai AFTER INSERT ON sender_bot_moves BEGIN\n UPDATE persons SET kind = NULL WHERE kind IS NOT NULL AND id IN (SELECT person_id FROM identity_links WHERE identity_id = NEW.identity_id);\nEND;" ] + }, + { + "name": "20261125111113_version-75-bot-identities", + "statements": [ + "CREATE TABLE `sender_bot_identities` (\n\t`identity_id` integer PRIMARY KEY,\n\t`bot_id` integer NOT NULL,\n\t`created_at` integer NOT NULL\n);", + "CREATE INDEX `sender_bot_identities_by_bot_id` ON `sender_bot_identities` (`bot_id`);", + "CREATE INDEX `sender_bot_moves_by_from_person_id` ON `sender_bot_moves` (`from_person_id`);" + ] + }, + { + "name": "20261125111118_version-75-bot-identities-moved", + "statements": [ + "-- A bot of version 74 is a person row holding the bot's identities. Each identity moves to the bot, the move is logged\n-- with the bot's author, and the person row stays, emptied and hidden, so a move back gives its uid back.\nINSERT INTO sender_bot_identities (identity_id, bot_id, created_at)\nSELECT l.identity_id, b.id, CAST(unixepoch('subsec') * 1000 AS INTEGER)\nFROM sender_bots b JOIN identity_links l ON l.person_id = b.person_id;", + "INSERT INTO sender_bot_moves (identity_id, from_person_id, from_bot_id, to_person_id, to_bot_id, author, reason, created_at)\nSELECT s.identity_id, b.person_id, NULL, NULL, b.id, b.author, 'store version 75: a bot holds its own identities',\n CAST(unixepoch('subsec') * 1000 AS INTEGER)\nFROM sender_bot_identities s JOIN sender_bots b ON b.id = s.bot_id;", + "DELETE FROM identity_links WHERE identity_id IN (SELECT identity_id FROM sender_bot_identities);", + "-- Negative: a build before 75 reads a bot as its person row, and this names none.\nUPDATE sender_bots SET person_id = -id;", + "-- Stored as a merge's emptied person is, so every build's people list leaves it out.\nCREATE TRIGGER person_kind_sender_bot_origin_au AFTER UPDATE OF kind ON persons\nWHEN NEW.kind IS NOT 'merged' AND NEW.owner = 0\n AND NOT EXISTS (SELECT 1 FROM identity_links WHERE person_id = NEW.id)\n AND EXISTS (SELECT 1 FROM sender_bot_moves WHERE from_person_id = NEW.id AND to_bot_id IS NOT NULL) BEGIN\n UPDATE persons SET kind = 'merged' WHERE id = NEW.id;\nEND;", + "UPDATE persons SET kind = 'merged' WHERE owner = 0\n AND NOT EXISTS (SELECT 1 FROM identity_links WHERE person_id = persons.id)\n AND EXISTS (SELECT 1 FROM sender_bot_moves WHERE from_person_id = persons.id AND to_bot_id IS NOT NULL);", + "-- An older build's sync links an identity with no person to a new one: a bot's identity gets none.\nCREATE TRIGGER sender_bot_identity_link_bi BEFORE INSERT ON identity_links\nWHEN EXISTS (SELECT 1 FROM sender_bot_identities WHERE identity_id = NEW.identity_id) BEGIN\n SELECT RAISE(IGNORE);\nEND;", + "-- ...and the person row it made for it, with its log row, goes again.\nCREATE TRIGGER sender_bot_identity_person_ai AFTER INSERT ON identity_link_events\nWHEN NEW.from_person_id IS NULL\n AND EXISTS (SELECT 1 FROM sender_bot_identities WHERE identity_id = NEW.identity_id)\n AND NOT EXISTS (SELECT 1 FROM identity_links WHERE person_id = NEW.to_person_id) BEGIN\n DELETE FROM identity_link_events WHERE id = NEW.id;\n DELETE FROM persons WHERE id = NEW.to_person_id AND owner = 0\n AND NOT EXISTS (SELECT 1 FROM identity_link_events WHERE from_person_id = NEW.to_person_id OR to_person_id = NEW.to_person_id);\nEND;", + "CREATE TRIGGER sender_bot_identities_linked_bi BEFORE INSERT ON sender_bot_identities\nWHEN EXISTS (SELECT 1 FROM identity_links WHERE identity_id = NEW.identity_id) BEGIN\n SELECT RAISE(ABORT, 'sender_bot_identities: the identity is linked to a person; unlink it first');\nEND;", + "-- An older build gives a bot back by deleting its row; one that still holds identities stays.\nCREATE TRIGGER sender_bots_holding_bd BEFORE DELETE ON sender_bots\nWHEN EXISTS (SELECT 1 FROM sender_bot_identities WHERE bot_id = OLD.id) BEGIN\n SELECT RAISE(IGNORE);\nEND;", + "CREATE TRIGGER sender_bot_identities_identity_ad AFTER DELETE ON identities BEGIN\n DELETE FROM sender_bot_identities WHERE identity_id = OLD.id;\nEND;", + "CREATE TRIGGER sender_bots_emptied_ad AFTER DELETE ON sender_bot_identities\nWHEN NOT EXISTS (SELECT 1 FROM sender_bot_identities WHERE bot_id = OLD.bot_id) BEGIN\n DELETE FROM sender_bots WHERE id = OLD.bot_id;\nEND;", + "CREATE TRIGGER sender_bots_emptied_au AFTER UPDATE OF bot_id ON sender_bot_identities\nWHEN NOT EXISTS (SELECT 1 FROM sender_bot_identities WHERE bot_id = OLD.bot_id) BEGIN\n DELETE FROM sender_bots WHERE id = OLD.bot_id;\nEND;" + ] } ] diff --git a/src/store/sqlite/people-list.ts b/src/store/sqlite/people-list.ts index 23dc8424b..da6994ced 100644 --- a/src/store/sqlite/people-list.ts +++ b/src/store/sqlite/people-list.ts @@ -16,10 +16,10 @@ import { } from "../../domain/person-kinds.js" import { type CacheDatabase, isQueryOnly, type SqlValue } from "../driver.js" import { fold } from "../normalize.js" -import { groupByDomain } from "./domain-organizations.js" +import { groupByDomain, type Sorted } from "./domain-organizations.js" import { mergedAwaySql } from "./merged-persons.js" import { ALWAYS_SHOWN, type ShownBecause, shownReasons } from "./person-ties.js" -import { type HeldBot, ownerPeopleOf, ruleMove, SENDER_BOT_PREFIX, senderBotsOf } from "./sender-bots.js" +import { ownerPeopleOf, ruleBotsBack, ruleToBot, settleLegacyBots } from "./sender-bots.js" import { type Reach, type SenderSignal, senderSignalsOf, sentMailOf } from "./sender-signals.js" import { mergedAssignees } from "./task-board.js" import { hiddenTestPeople } from "./test-people.js" @@ -64,13 +64,8 @@ export interface ListedPerson { messagesFrom: number /** The newest of their messages, their mail and their one-to-one chat's last message, as ISO time. */ lastContact: string | null - /** Why they are shown; empty for someone hidden by default, and for a bot. */ + /** Why they are shown; empty for someone hidden by default. */ ties: ShownBecause[] - /** - * The sender bot this row is (`sender-bot:`), listed as `automated` under its person row's ref; `null` for a - * person. - */ - bot: string | null /** How their messages reached the owner (`senderSignalsOf`); `null` when nothing says. Worked out for the page. */ reach: Reach | null /** What their mail and addresses show about who writes and how it reached the owner. Worked out for the page. */ @@ -305,8 +300,8 @@ interface Candidate { interface Classified extends Omit { id: number - /** What the rules do with this person when the kind is kept: make them a bot, or a rule's bot a person again. */ - move?: "bot" | "person" + /** What the rules do with this person when the kind is kept: give their identities to a sender bot. */ + move?: "bot" /** Worked out once: a collator over 50,000 names takes most of a list's time. */ nameOrder: string emails: string[] @@ -334,9 +329,6 @@ const PROGRAM_SIGNALS: readonly KindSignal[] = [ "bulk-never-replied", ] -/** What the owner decided for this person: a bot of the owner's, or a person no rule makes a bot. */ -type Held = "bot" | "person" | undefined - /** The first rule that holds; the list's contract in the people-clients-digests plan names the same order. */ const kindOf = ( shown: string | null, @@ -344,7 +336,7 @@ const kindOf = ( ties: ShownBecause[], mail: MailCounts | undefined, test: boolean, - held?: Held, + keptByOwner = false, ): { kind: PersonKind; signals: (ShownBecause | KindSignal)[] } => { if (test) return { kind: "test", signals: ["test-data"] } const emails = facts?.emails ?? [] @@ -361,11 +353,10 @@ const kindOf = ( ? (["null-return-path"] as const) : []), ] - if (held === "bot") return { kind: "automated", signals: automated.length > 0 ? automated : ["owner-choice"] } const always = ties.filter((tie) => (ALWAYS_SHOWN as readonly string[]).includes(tie)) if (always.length > 0) return { kind: "person", signals: ties } // One mailbox's newsletter signal must not hide someone the owner talks to in a private chat. - if (held !== "person" && automated.length > 0 && (facts?.bot || !facts?.twoWay)) + if (!keptByOwner && automated.length > 0 && (facts?.bot || !facts?.twoWay)) return { kind: "automated", signals: automated } const organization: KindSignal[] = [ ...(facts?.organization ? (["organization"] as const) : []), @@ -395,9 +386,6 @@ const isProgram = ( (facts.bot || (!facts.twoWay && !ties.includes("mail"))) && (facts.identities === 1 || facts.programIdentities === facts.identities) -const moveOf = (bot: HeldBot | undefined, program: boolean): Classified["move"] => - bot === undefined ? (program ? "bot" : undefined) : bot.author === "rules" && !program ? "person" : undefined - /** Each person with their kind, contact and counts; the last contact is added for the page alone. */ const classified = ( database: CacheDatabase, @@ -407,7 +395,6 @@ const classified = ( ): Classified[] => { const facts = factsOf(database, scope) const test = hiddenTestPeople(database) - const bots = senderBotsOf(database) const ownerPeople = ownerPeopleOf(database) const tasks = countsOf(database, TASK_COUNTS, mergedAssignees(database)) const mail = new Map( @@ -424,20 +411,16 @@ const classified = ( const contact = { username: own?.username ?? null, phone: own?.phone ?? null, email: own?.email ?? null } const shown = displayName(name, { ...contact, name: own?.name ?? null }) const ties = reasons.get(id) ?? [] - const bot = bots.get(id) - const held: Held = bot?.author === "owner" ? "bot" : ownerPeople.has(id) && bot === undefined ? "person" : undefined - const worked = kindOf(shown, own, ties, mail.get(id), test.has(id), held) - const move = - held === undefined && !owner && worked.kind !== "test" ? moveOf(bot, isProgram(worked, own, ties)) : undefined - const isBot = (bot !== undefined && move !== "person") || move === "bot" - const named = bot?.name ?? shown + const kept = ownerPeople.has(id) + const worked = kindOf(shown, own, ties, mail.get(id), test.has(id), kept) + const toBot = !kept && !owner && worked.kind !== "test" && isProgram(worked, own, ties) return { id, - ...(move === undefined ? {} : { move }), - nameOrder: nameOrderOf(named), + ...(toBot ? { move: "bot" as const } : {}), + nameOrder: nameOrderOf(shown), person: `person:${id}`, name, - displayName: named, + displayName: shown, kind: worked.kind, kindSignals: worked.signals, owner, @@ -447,8 +430,7 @@ const classified = ( ...contact, usernameSource: own?.usernameSource ?? null, messagesFrom: (own?.messages ?? 0) + (mail.get(id)?.n ?? 0), - ties: isBot ? [] : ties, - bot: bot !== undefined && move !== "person" ? `${SENDER_BOT_PREFIX}${bot.id}` : null, + ties, emails: own?.emails ?? [], twoWay: own?.twoWay ?? false, } @@ -548,24 +530,35 @@ const workOut = (database: CacheDatabase, all: boolean, most?: number): Worked[] const keep = (database: CacheDatabase, worked: Worked[]): void => { const at = Date.now() - // Before the kinds: a move clears the person's kind through its triggers. + settleLegacyBots(database, at) + ruleBotsBack(database, at) + const bots: Sorted[] = [] for (const person of worked) - if (person.move !== undefined && person.kind !== MERGED) - ruleMove(database, person.id, person.move, person.kindSignals.join(", "), at) + if (person.move === "bot" && person.kind !== MERGED) { + bots.push({ + id: ruleToBot(database, person.id, person.kindSignals.join(", "), at), + displayName: person.displayName, + holds: true, + bot: true, + }) + person.kind = MERGED + } const keptAsPeople = ownerPeopleOf(database) groupByDomain( database, - worked - .filter((person) => !person.owner && person.kind !== MERGED && person.kind !== "test") - .map((person) => ({ - id: person.id, - displayName: person.displayName, - holds: - !keptAsPeople.has(person.id) && - (person.bot !== null || - person.move === "bot" || - (person.kind === "organization" && person.kindSignals.includes("role-address"))), - })), + [ + ...bots, + ...worked + .filter((person) => !person.owner && person.kind !== MERGED && person.kind !== "test") + .map((person) => ({ + id: person.id, + displayName: person.displayName, + holds: + !keptAsPeople.has(person.id) && + person.kind === "organization" && + person.kindSignals.includes("role-address"), + })), + ], at, ) const row = database.prepare( @@ -810,7 +803,7 @@ export const similarPeople = (database: CacheDatabase, typed: string, limit: num const byId = new Map(people.map((person) => [person.id, person])) const ordered = [...sameName.keys()].flatMap((id) => byId.get(id) ?? []) const rows = classified(database, ordered, [...sameName.keys()], ties).filter( - ({ kind, bot }) => kind !== "test" && bot === null, + ({ kind, move }) => kind !== "test" && move === undefined, ) const same = rows.map(({ id }) => sameName.get(id) === true) return withLastContact(database, rows).map((person, at) => ({ ...person, sameName: same[at] === true })) diff --git a/src/store/sqlite/person-links.ts b/src/store/sqlite/person-links.ts index 329ff806f..c58551ceb 100644 --- a/src/store/sqlite/person-links.ts +++ b/src/store/sqlite/person-links.ts @@ -2,6 +2,7 @@ import { CliError } from "@wirecat/cli-base" import { isEmailAddress, isRoleAddress } from "../../domain/addresses.js" import { displayName, noFallbacks, takeFallbacks } from "../../domain/display-names.js" import type { Id, Page } from "../../domain/models.js" +import { SENDER_BOT_PREFIX } from "../../domain/person-kinds.js" import type { IdentityRef, LinkedIdentity, @@ -40,8 +41,23 @@ const identityRow = ({ orm }: StoreContext, { provider, id }: IdentityRef) => export const required = (context: StoreContext, ref: IdentityRef) => { const found = identityRow(context, ref) - if (!found) throw new CliError("not_found", `no ${ref.provider} person ${ref.id} in the store`) - return found + if (found) return found + const bot = context.database + .prepare( + "SELECT s.bot_id FROM sender_bot_identities s JOIN identities i ON i.id = s.identity_id " + + "WHERE i.provider = ? AND i.external_id = ?", + ) + .get(ref.provider, ref.id) + if (bot !== undefined) + throw new CliError( + "validation_error", + `${ref.provider} ${ref.id} is ${SENDER_BOT_PREFIX}${bot.bot_id}, not a person`, + { + reason: "sender-bot.not-a-person", + reference: `${SENDER_BOT_PREFIX}${bot.bot_id}`, + }, + ) + throw new CliError("not_found", `no ${ref.provider} person ${ref.id} in the store`) } /** Every phone and address an identity holds: the source's lists, else the one `phone` and `email`. */ diff --git a/src/store/sqlite/person-match-scan.ts b/src/store/sqlite/person-match-scan.ts index 59b879fd9..1b13483a9 100644 --- a/src/store/sqlite/person-match-scan.ts +++ b/src/store/sqlite/person-match-scan.ts @@ -313,9 +313,14 @@ const touchesOwner = ({ context, result }: Pass, from: number, to: number, signa return true } -/** A sender bot is never proposed as the same person, by any signal; the owner moves it by hand. */ +/** A person every identity left for a sender bot is never proposed as the same person; the owner moves it by hand. */ const touchesBot = ({ context, result }: Pass, from: number, to: number, signal: string): boolean => { - const held = context.database.prepare("SELECT 1 FROM sender_bots WHERE person_id IN (?, ?) LIMIT 1").get(from, to) + const held = context.database + .prepare( + "SELECT 1 FROM sender_bot_moves m WHERE m.from_person_id IN (?, ?) AND m.to_bot_id IS NOT NULL " + + "AND NOT EXISTS (SELECT 1 FROM identity_links l WHERE l.person_id = m.from_person_id) LIMIT 1", + ) + .get(from, to) if (held === undefined) return false result.skipped.push({ persons: [String(from), String(to)], signal, reason: "identity.not-a-person" }) return true diff --git a/src/store/sqlite/schema.ts b/src/store/sqlite/schema.ts index 5def7c042..ff24c8a99 100644 --- a/src/store/sqlite/schema.ts +++ b/src/store/sqlite/schema.ts @@ -362,7 +362,7 @@ export const bots = sqliteTable( ], ) -export { senderBotMoves, senderBots } from "./schema/sender-bots.js" +export { senderBotIdentities, senderBotMoves, senderBots } from "./schema/sender-bots.js" export const chats = sqliteTable( "chats", diff --git a/src/store/sqlite/schema/sender-bots.ts b/src/store/sqlite/schema/sender-bots.ts index 9b60d92ba..525256863 100644 --- a/src/store/sqlite/schema/sender-bots.ts +++ b/src/store/sqlite/schema/sender-bots.ts @@ -11,6 +11,16 @@ export const senderBots = sqliteTable("sender_bots", { updatedAt: integer("updated_at").notNull(), }) +export const senderBotIdentities = sqliteTable( + "sender_bot_identities", + { + identityId: integer("identity_id").primaryKey(), + botId: integer("bot_id").notNull(), + createdAt: integer("created_at").notNull(), + }, + (table) => [index("sender_bot_identities_by_bot_id").on(table.botId)], +) + export const senderBotMoves = sqliteTable( "sender_bot_moves", { @@ -24,5 +34,8 @@ export const senderBotMoves = sqliteTable( reason: text("reason"), createdAt: integer("created_at").notNull(), }, - (table) => [index("sender_bot_moves_by_identity_id").on(table.identityId)], + (table) => [ + index("sender_bot_moves_by_identity_id").on(table.identityId), + index("sender_bot_moves_by_from_person_id").on(table.fromPersonId), + ], ) diff --git a/src/store/sqlite/sender-bots.ts b/src/store/sqlite/sender-bots.ts index e0fdba7a9..a83845c95 100644 --- a/src/store/sqlite/sender-bots.ts +++ b/src/store/sqlite/sender-bots.ts @@ -1,43 +1,227 @@ import { CliError } from "@wirecat/cli-base" -import type { CacheDatabase } from "../driver.js" +import { displayName } from "../../domain/display-names.js" +import { SENDER_BOT_PREFIX } from "../../domain/person-kinds.js" +import type { CacheDatabase, SqlValue } from "../driver.js" +import { fold } from "../normalize.js" import type { IdentityRef, PersonRecord } from "../types.js" -import { releaseDomainHolds } from "./domain-organizations.js" +import { groupByDomain, releaseDomainHolds } from "./domain-organizations.js" import { currentPerson } from "./merged-persons.js" import type { StoreContext } from "./open.js" -import { isOwner, mergePerson, move, recordOf, renameAfterLeaving, required, unlinkIdentity } from "./person-links.js" -import { write } from "./transaction.js" - -export const SENDER_BOT_PREFIX = "sender-bot:" +import { isOwner, mergePerson, move, recordOf, renameAfterLeaving } from "./person-links.js" +import { type Reach, type SenderSignal, senderSignalsOf, sentMailOf } from "./sender-signals.js" +import { read, write } from "./transaction.js" export type BotAuthor = "rules" | "owner" -/** A sender bot as the people list reads it, keyed by the person row whose identities are the bot's. */ -export interface HeldBot { - id: number - author: BotAuthor +/** @experimental */ +export interface BotIdentity { + provider: string + id: string name: string | null + username: string | null } +/** A program that writes to the owner, apart from people: it has no ties, no tasks and no merge review. @experimental */ export interface SenderBot { + /** `sender-bot:`. */ bot: string - /** The person row whose identities are the bot's: its handle in `people list` and `people show`. */ - person: string + /** The owner's name for it; `displayName` falls back to its identities'. */ name: string | null + displayName: string | null + /** The organization it sends for (`organization:`), from its mail domain or the owner. */ + organization: string | null + /** `owner` when the owner moved it: no rule gives it back to a person. */ + author: BotAuthor + /** The kind signals that sorted it, or the owner's words. */ + reason: string | null + identities: BotIdentity[] + /** Messages and mail it sent, every account together. */ + messagesFrom: number + lastContact: string | null + reach: Reach | null + signals: SenderSignal[] +} + +/** One move of an identity between a person and a bot. @experimental */ +export interface BotMove { + identity: IdentityRef + /** `person:` or `sender-bot:`; `null` for none. */ + from: string | null + to: string | null + author: BotAuthor + reason: string | null + at: string +} + +/** @experimental */ +export interface SenderBotDetails extends SenderBot { + /** Every move to or from this bot, oldest first. */ + moves: BotMove[] +} + +/** @experimental */ +export interface BotListOptions { + /** Part of a name, address or username, at least 3 characters. */ + query?: string + /** `organization:`: the bots that send for it. */ + organization?: string + limit: number + offset?: number +} + +/** @experimental */ +export interface BotList { + items: SenderBot[] + hasMore: boolean + total: number +} + +interface Log { author: BotAuthor reason: string | null + at: number +} + +interface Side { + person?: number + bot?: number +} + +const MIN_QUERY = 3 +const HOLDS = "EXISTS (SELECT 1 FROM sender_bot_identities h WHERE h.bot_id = b.id)" +const SHOWN = + "coalesce(b.name, (SELECT coalesce(i.name, i.username, i.external_id) FROM sender_bot_identities s " + + "JOIN identities i ON i.id = s.identity_id WHERE s.bot_id = b.id ORDER BY i.name IS NULL, i.id LIMIT 1))" + +const refOf = (side: Side): string | null => + side.person !== undefined + ? `person:${side.person}` + : side.bot !== undefined + ? `${SENDER_BOT_PREFIX}${side.bot}` + : null + +const holderOf = (database: CacheDatabase, identity: number): Side => { + const linked = database.prepare("SELECT person_id FROM identity_links WHERE identity_id = ?").get(identity) + if (linked !== undefined) return { person: Number(linked.person_id) } + const held = database.prepare("SELECT bot_id FROM sender_bot_identities WHERE identity_id = ?").get(identity) + return held === undefined ? {} : { bot: Number(held.bot_id) } +} + +const identitiesOf = (database: CacheDatabase, person: number): number[] => + database + .prepare("SELECT identity_id FROM identity_links WHERE person_id = ? ORDER BY identity_id") + .all(person) + .map((row) => Number(row.identity_id)) + +const botIdentitiesOf = (database: CacheDatabase, bot: number): number[] => + database + .prepare("SELECT identity_id FROM sender_bot_identities WHERE bot_id = ? ORDER BY identity_id") + .all(bot) + .map((row) => Number(row.identity_id)) + +const logMove = (database: CacheDatabase, identity: number, from: Side, to: Side, { author, reason, at }: Log) => + database + .prepare( + "INSERT INTO sender_bot_moves (identity_id, from_person_id, from_bot_id, to_person_id, to_bot_id, author, " + + "reason, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", + ) + .run(identity, from.person ?? null, from.bot ?? null, to.person ?? null, to.bot ?? null, author, reason, at) + +/** `person_id` only keeps builds before version 75 from reading the bot as a person: a negative one names none. */ +const createBot = (database: CacheDatabase, { author, reason, at }: Log, name: string | null = null): number => + Number( + database + .prepare( + "INSERT INTO sender_bots (person_id, name, author, reason, created_at, updated_at) " + + "VALUES ((SELECT min(0, coalesce(min(person_id), 0)) - 1 FROM sender_bots), ?, ?, ?, ?, ?) RETURNING id", + ) + .get(name, author, reason, at, at)?.id, + ) + +/** A person every identity left for a bot is stored as a merge's emptied person is: no list shows them. */ +const retireEmptied = (database: CacheDatabase, people: Iterable) => { + const retire = database.prepare( + "UPDATE persons SET kind = 'merged' WHERE id = ? AND NOT EXISTS (SELECT 1 FROM identity_links WHERE person_id = ?)", + ) + for (const person of people) retire.run(person, person) } -export const senderBotsOf = (database: CacheDatabase): Map => - new Map( +/** + * Moves identities to a bot, off a person or another bot, each move logged. Answers the people each left, and which + * identities. The caller holds the write lock. + */ +const intoBot = (database: CacheDatabase, identities: readonly number[], bot: number, log: Log) => { + const left = new Map() + for (const identity of identities) { + const from = holderOf(database, identity) + if (from.bot === bot) continue + if (from.person !== undefined) { + database.prepare("DELETE FROM identity_links WHERE identity_id = ?").run(identity) + left.set(from.person, [...(left.get(from.person) ?? []), identity]) + } + if (from.bot !== undefined) + database.prepare("UPDATE sender_bot_identities SET bot_id = ? WHERE identity_id = ?").run(bot, identity) + else + database + .prepare("INSERT INTO sender_bot_identities (identity_id, bot_id, created_at) VALUES (?, ?, ?)") + .run(identity, bot, log.at) + logMove(database, identity, from, { bot }, log) + } + retireEmptied(database, left.keys()) + return left +} + +/** The person an identity last left for a bot, as that person is now; `undefined` when it came from none. */ +const originOf = (database: CacheDatabase, identity: number): number | undefined => { + const row = database + .prepare( + "SELECT m.from_person_id FROM sender_bot_moves m JOIN persons p ON p.id = m.from_person_id " + + "WHERE m.identity_id = ? AND m.to_bot_id IS NOT NULL ORDER BY m.id DESC LIMIT 1", + ) + .get(identity) + return row === undefined ? undefined : currentPerson(database, Number(row.from_person_id)) +} + +const newPerson = (database: CacheDatabase, identity: number, at: number): number => + Number( database - .prepare("SELECT id, person_id, author, name FROM sender_bots") - .all() - .map((row) => [ - Number(row.person_id), - { id: Number(row.id), author: row.author as BotAuthor, name: row.name == null ? null : String(row.name) }, - ]), + .prepare( + "INSERT INTO persons (name, created_at, updated_at) VALUES ((SELECT name FROM identities WHERE id = ?), ?, ?) " + + "RETURNING id", + ) + .get(identity, at, at)?.id, ) +/** + * Gives a bot's identities to a person: `to`, else the person each came from, else a person row of its own. The bot + * goes with its last identity. Answers the person each went to. The caller holds the write lock. + */ +const outOfBot = (database: CacheDatabase, identities: readonly number[], to: number | undefined, log: Log) => { + const by = log.author === "owner" ? "owner" : "rules" + const went = new Map() + for (const identity of identities) { + const from = holderOf(database, identity) + if (from.bot === undefined) continue + database.prepare("DELETE FROM sender_bot_identities WHERE identity_id = ?").run(identity) + const target = to ?? originOf(database, identity) ?? newPerson(database, identity, log.at) + database + .prepare( + "INSERT INTO identity_links (identity_id, person_id, method, confidence, created_at, author, updated_at) " + + "VALUES (?, ?, 'bot', 1, ?, ?, ?)", + ) + .run(identity, target, log.at, by, log.at) + database + .prepare( + "INSERT INTO identity_link_events (identity_id, from_person_id, to_person_id, method, created_at, author) " + + "VALUES (?, NULL, ?, 'bot', ?, ?)", + ) + .run(identity, target, log.at, by) + logMove(database, identity, from, { person: target }, log) + went.set(identity, target) + } + return went +} + /** People holding an identity the owner last moved to a person, or kept as one: no rule makes them a bot. */ export const ownerPeopleOf = (database: CacheDatabase): Set => new Set( @@ -51,171 +235,310 @@ export const ownerPeopleOf = (database: CacheDatabase): Set => .map((row) => Number(row.person)), ) +/** A person every identity left for a bot is no one's assignee: the bot has no tasks. */ export const refuseBotAssignee = (database: CacheDatabase, person: number): void => { - if (database.prepare("SELECT 1 FROM sender_bots WHERE person_id = ?").get(person) !== undefined) - throw new CliError("validation_error", `person:${person} is a sender bot, which is no one's assignee`, { - reason: "sender-bot.assignee", - }) + const bot = database + .prepare( + "SELECT m.to_bot_id FROM sender_bot_moves m WHERE m.from_person_id = ? AND m.to_bot_id IS NOT NULL " + + "AND NOT EXISTS (SELECT 1 FROM identity_links WHERE person_id = ?) ORDER BY m.id DESC LIMIT 1", + ) + .get(person, person) + if (bot !== undefined) + throw new CliError( + "validation_error", + `person:${person} moved to ${SENDER_BOT_PREFIX}${bot.to_bot_id}, which is no one's assignee`, + { reason: "sender-bot.assignee" }, + ) } -const identitiesOf = (database: CacheDatabase, person: number): number[] => - database - .prepare("SELECT identity_id FROM identity_links WHERE person_id = ? ORDER BY identity_id") - .all(person) - .map((row) => Number(row.identity_id)) - -interface Side { - person?: number - bot?: number +/** A rule's move of a whole person to a new bot; answers the bot. The caller holds the write lock. */ +export const ruleToBot = (database: CacheDatabase, person: number, reason: string, at: number): number => { + const log = { author: "rules" as const, reason, at } + const bot = createBot(database, log) + intoBot(database, identitiesOf(database, person), bot, log) + return bot } -const logMoves = ( - database: CacheDatabase, - identities: readonly number[], - from: Side, - to: Side, - { author, reason, at }: { author: BotAuthor; reason: string | null; at: number }, -) => { - const row = database.prepare( - "INSERT INTO sender_bot_moves (identity_id, from_person_id, from_bot_id, to_person_id, to_bot_id, author, reason, " + - "created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", - ) - for (const identity of identities) - row.run(identity, from.person ?? null, from.bot ?? null, to.person ?? null, to.bot ?? null, author, reason, at) +/** + * A rule's bot the owner wrote to, by mail or in a private chat both wrote in, goes back to the people its identities + * came from; a messenger's own bot flag holds anyway. The caller holds the write lock. + */ +export const ruleBotsBack = (database: CacheDatabase, at: number): void => { + const back = database + .prepare( + "SELECT b.id FROM sender_bots b WHERE b.author = 'rules' AND NOT EXISTS (SELECT 1 FROM sender_bot_identities s " + + "JOIN identities i ON i.id = s.identity_id WHERE s.bot_id = b.id AND i.bot = 1) " + + "AND EXISTS (SELECT 1 FROM sender_bot_identities s WHERE s.bot_id = b.id AND (" + + "EXISTS (SELECT 1 FROM email_recipients r JOIN emails e ON e.id = r.email_id WHERE r.identity_id = s.identity_id " + + "AND e.outgoing = 1 AND e.deleted_at IS NULL AND e.draft IS NOT 1) OR " + + "EXISTS (SELECT 1 FROM messages m JOIN chats c ON c.id = m.chat_id WHERE m.sender_identity_id = s.identity_id " + + "AND m.outgoing IS NOT 1 AND c.kind = 'dialog' AND EXISTS (SELECT 1 FROM messages o WHERE o.chat_id = c.id " + + "AND o.outgoing = 1))))", + ) + .all() + const log = { author: "rules" as const, reason: "the owner wrote to it", at } + for (const row of back) outOfBot(database, botIdentitiesOf(database, Number(row.id)), undefined, log) } -const createBot = ( - database: CacheDatabase, - person: number, - { author, reason, at, name = null }: { author: BotAuthor; reason: string | null; at: number; name?: string | null }, -): number => - Number( +/** + * A bot a build before version 75 sorted after the upgrade holds its person row's identities there: they move to the + * bot, as the upgrade moved the others. The caller holds the write lock. + */ +export const settleLegacyBots = (database: CacheDatabase, at: number): void => { + const legacy = database.prepare("SELECT id, person_id, author, reason FROM sender_bots WHERE person_id > 0").all() + for (const row of legacy) { + const bot = Number(row.id) + const identities = identitiesOf(database, Number(row.person_id)) database .prepare( - "INSERT INTO sender_bots (person_id, name, author, reason, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?) " + - "RETURNING id", + "UPDATE sender_bots SET person_id = (SELECT min(0, coalesce(min(person_id), 0)) - 1 FROM sender_bots) WHERE id = ?", ) - .get(person, name, author, reason, at, at)?.id, - ) - -/** A rule's move of a whole person to a bot, or of a rule's bot back to a person; the caller holds the write lock. */ -export const ruleMove = ( - database: CacheDatabase, - person: number, - to: "bot" | "person", - reason: string, - at: number, -): void => { - const identities = identitiesOf(database, person) - const options = { author: "rules" as const, reason, at } - if (to === "bot") { - const bot = createBot(database, person, options) - logMoves(database, identities, { person }, { bot }, options) - return + .run(bot) + const log = { author: row.author as BotAuthor, reason: "sorted by a build before store version 75", at } + intoBot(database, identities, bot, log) + if (identities.length === 0) database.prepare("DELETE FROM sender_bots WHERE id = ?").run(bot) } - const held = database.prepare("SELECT id FROM sender_bots WHERE person_id = ? AND author = 'rules'").get(person) - if (held === undefined) return - database.prepare("DELETE FROM sender_bots WHERE id = ?").run(Number(held.id)) - logMoves(database, identities, { bot: Number(held.id) }, { person }, options) } -const botRow = (database: CacheDatabase, ref: string) => { +const botIdOf = (database: CacheDatabase, ref: string): number => { const id = ref.startsWith(SENDER_BOT_PREFIX) ? ref.slice(SENDER_BOT_PREFIX.length) : "" const row = /^[1-9]\d*$/.test(id) - ? database.prepare("SELECT id, person_id FROM sender_bots WHERE id = ?").get(Number(id)) + ? database.prepare("SELECT id FROM sender_bots WHERE id = ?").get(Number(id)) : undefined if (row === undefined) throw new CliError("not_found", `no ${ref} in the store`, { reason: "sender-bot.not-found", reference: ref }) - return { id: Number(row.id), person: Number(row.person_id) } + return Number(row.id) } -const botOfPerson = (database: CacheDatabase, person: number): number | undefined => { - const row = database.prepare("SELECT id FROM sender_bots WHERE person_id = ?").get(person) - return row === undefined ? undefined : Number(row.id) -} - -const personRow = (database: CacheDatabase, ref: string): number => { +const personIdOf = (database: CacheDatabase, ref: string): number => { const uid = ref.startsWith("person:") ? ref.slice("person:".length) : "" const found = /^[1-9]\d*$/.test(uid) ? database.prepare("SELECT id FROM persons WHERE id = ?").get(uid) : undefined if (found === undefined) throw new CliError("not_found", `no ${ref} in the store`, { reference: ref }) return currentPerson(database, Number(found.id)) } -/** What a move names: a whole person or bot, or one identity and the person it sits on. */ -const subjectOf = (context: StoreContext, subject: string | IdentityRef) => { - const { database } = context - if (typeof subject !== "string") { - const found = required(context, subject) - const alone = identitiesOf(database, found.personPk).length === 1 - return alone ? { person: found.personPk } : { person: found.personPk, identity: found.pk, ref: subject } +const identityIdOf = (database: CacheDatabase, { provider, id }: IdentityRef): number => { + const row = database.prepare("SELECT id FROM identities WHERE provider = ? AND external_id = ?").get(provider, id) + if (row === undefined) throw new CliError("not_found", `no ${provider} identity ${id} in the store`) + return Number(row.id) +} + +/** What a move names: a person's identities, a bot's, or one identity. */ +const subjectOf = (database: CacheDatabase, subject: string | IdentityRef) => { + if (typeof subject !== "string") return { identities: [identityIdOf(database, subject)] } + if (subject.startsWith(SENDER_BOT_PREFIX)) { + const bot = botIdOf(database, subject) + return { bot, identities: botIdentitiesOf(database, bot) } } - if (subject.startsWith(SENDER_BOT_PREFIX)) return { person: botRow(database, subject).person } - return { person: personRow(database, subject) } + const person = personIdOf(database, subject) + const identities = identitiesOf(database, person) + const took = identities.length === 0 ? botThatTook(database, person) : undefined + return took === undefined ? { person, identities } : { bot: took, identities: botIdentitiesOf(database, took) } +} + +/** The bot that took every identity of a person, so their `person:` ref still names it. */ +const botThatTook = (database: CacheDatabase, person: number): number | undefined => { + const row = database + .prepare( + "SELECT s.bot_id FROM sender_bot_moves m JOIN sender_bot_identities s ON s.identity_id = m.identity_id " + + "WHERE m.from_person_id = ? AND m.to_bot_id IS NOT NULL ORDER BY m.id DESC LIMIT 1", + ) + .get(person) + return row === undefined ? undefined : Number(row.bot_id) } -const senderBotOf = (database: CacheDatabase, id: number): SenderBot => { - const row = database.prepare("SELECT person_id, name, author, reason FROM sender_bots WHERE id = ?").get(id) - return { - bot: `${SENDER_BOT_PREFIX}${id}`, - person: `person:${Number(row?.person_id)}`, - name: row?.name == null ? null : String(row.name), - author: row?.author as BotAuthor, - reason: row?.reason == null ? null : String(row.reason), +const botsOf = (database: CacheDatabase, ids: readonly number[]): SenderBot[] => { + if (ids.length === 0) return [] + const json = JSON.stringify(ids) + const rows = new Map( + database + .prepare( + "SELECT id, name, organization_id, author, reason FROM sender_bots WHERE id IN (SELECT value FROM json_each(?))", + ) + .all(json) + .map((row) => [Number(row.id), row]), + ) + const identities = new Map() + for (const row of database + .prepare( + "SELECT s.bot_id, i.provider, i.external_id, i.name, i.username, i.phone FROM sender_bot_identities s " + + "JOIN identities i ON i.id = s.identity_id WHERE s.bot_id IN (SELECT value FROM json_each(?)) ORDER BY i.id", + ) + .all(json)) { + const held = identities.get(Number(row.bot_id)) ?? [] + held.push({ + provider: String(row.provider), + id: String(row.external_id), + name: row.name == null ? null : String(row.name), + username: row.username == null ? null : String(row.username), + phone: row.phone == null ? null : String(row.phone), + }) + identities.set(Number(row.bot_id), held) } + const counts = new Map() + for (const row of database + .prepare( + "SELECT s.bot_id AS bot, count(*) AS n, max(m.sent_at) AS at FROM sender_bot_identities s " + + "JOIN messages m ON m.sender_identity_id = s.identity_id WHERE s.bot_id IN (SELECT value FROM json_each(?)) " + + "AND m.deleted_at IS NULL AND m.outgoing IS NOT 1 GROUP BY 1 UNION ALL " + + "SELECT s.bot_id, count(*), max(coalesce(e.sent_at, e.received_at)) FROM sender_bot_identities s " + + "JOIN emails e ON e.from_identity_id = s.identity_id WHERE s.bot_id IN (SELECT value FROM json_each(?)) " + + "AND e.deleted_at IS NULL AND e.outgoing IS NOT 1 GROUP BY 1", + ) + .all(json, json)) { + const was = counts.get(Number(row.bot)) ?? { n: 0, at: null } + const at = row.at == null ? was.at : Math.max(Number(row.at), was.at ?? 0) + counts.set(Number(row.bot), { n: was.n + Number(row.n), at }) + } + const sent = sentMailOf(database, ids, "bot") + return ids.flatMap((id) => { + const row = rows.get(id) + if (row === undefined) return [] + const held = identities.get(id) ?? [] + const first = held.find((one) => one.name !== null) ?? held[0] + const emails = held.flatMap((one) => (one.provider === "email" ? [one.id] : [])) + const name = row.name == null ? null : String(row.name) + const counted = counts.get(id) + return [ + { + bot: `${SENDER_BOT_PREFIX}${id}`, + name, + displayName: displayName(name, { + name: first?.name ?? null, + username: first?.username ?? null, + phone: first?.phone ?? null, + email: emails[0] ?? null, + }), + organization: row.organization_id == null ? null : `organization:${Number(row.organization_id)}`, + author: row.author as BotAuthor, + reason: row.reason == null ? null : String(row.reason), + identities: held.map(({ phone: _, ...one }) => one), + messagesFrom: counted?.n ?? 0, + lastContact: counted?.at == null ? null : new Date(counted.at).toISOString(), + ...senderSignalsOf(sent.get(id) ?? [], { addresses: emails, ownerWrote: false, chatted: false }), + }, + ] + }) +} + +const movesOf = (database: CacheDatabase, bot: number): BotMove[] => + database + .prepare( + "SELECT m.*, i.provider, i.external_id FROM sender_bot_moves m JOIN identities i ON i.id = m.identity_id " + + "WHERE m.from_bot_id = ? OR m.to_bot_id = ? ORDER BY m.id", + ) + .all(bot, bot) + .map((row) => ({ + identity: { provider: String(row.provider), id: String(row.external_id) }, + from: refOf({ + ...(row.from_person_id == null ? {} : { person: Number(row.from_person_id) }), + ...(row.from_bot_id == null ? {} : { bot: Number(row.from_bot_id) }), + }), + to: refOf({ + ...(row.to_person_id == null ? {} : { person: Number(row.to_person_id) }), + ...(row.to_bot_id == null ? {} : { bot: Number(row.to_bot_id) }), + }), + author: row.author as BotAuthor, + reason: row.reason == null ? null : String(row.reason), + at: new Date(Number(row.created_at)).toISOString(), + })) + +const detailsOf = (database: CacheDatabase, bot: number): SenderBotDetails => { + const [found] = botsOf(database, [bot]) + if (found === undefined) + throw new CliError("not_found", `no ${SENDER_BOT_PREFIX}${bot} in the store`, { reason: "sender-bot.not-found" }) + return { ...found, moves: movesOf(database, bot) } } +/** The sender bots, by name; a bot a build before version 75 sorted shows once a list has settled it. */ +export const listBots = (database: CacheDatabase, options: BotListOptions): BotList => { + const { limit, offset = 0 } = options + const where = [HOLDS] + const params: SqlValue[] = [] + if (options.query !== undefined) { + const text = options.query.trim() + if (text.length < MIN_QUERY) + throw new CliError( + "validation_error", + `a bots search takes at least ${MIN_QUERY} characters, got "${options.query}"`, + { reason: "query.short-text" }, + ) + const like = (form: string) => `%${form.replace(/[\\%_]/g, (c) => `\\${c}`)}%` + where.push( + "(b.name LIKE ? ESCAPE '\\' OR EXISTS (SELECT 1 FROM sender_bot_identities s JOIN identities i ON " + + "i.id = s.identity_id WHERE s.bot_id = b.id AND (i.name_folded LIKE ? ESCAPE '\\' " + + "OR i.external_id LIKE ? ESCAPE '\\' OR i.username LIKE ? ESCAPE '\\')))", + ) + params.push(like(text), like(fold(text)), like(text), like(text)) + } + if (options.organization !== undefined) { + const id = options.organization.startsWith("organization:") + ? options.organization.slice("organization:".length) + : "" + if (!/^[1-9]\d*$/.test(id)) + throw new CliError("validation_error", `an organization is organization:, got "${options.organization}"`) + where.push("b.organization_id = ?") + params.push(Number(id)) + } + return read(database, () => { + const filter = where.join(" AND ") + const total = Number(database.prepare(`SELECT count(*) AS n FROM sender_bots b WHERE ${filter}`).get(...params)?.n) + const ids = database + .prepare(`SELECT b.id FROM sender_bots b WHERE ${filter} ORDER BY ${SHOWN} COLLATE NOCASE, b.id LIMIT ? OFFSET ?`) + .all(...params, limit, offset) + .map((row) => Number(row.id)) + return { items: botsOf(database, ids), hasMore: total > offset + limit, total } + }) +} + +/** One sender bot with its identities and every move to or from it. */ +export const showBot = (database: CacheDatabase, ref: string): SenderBotDetails => + read(database, () => detailsOf(database, botIdOf(database, ref))) + /** - * The owner's word that a person, or one of their identities, is a program, for its whole history: its messages stay - * where they are, and no rule moves it back. `bot` joins it to a bot already stored; one identity of a person with - * others gets a person row of its own first. + * The owner's word that a person, a bot or one identity is a program, for its whole history: its messages stay where + * they are, and no rule gives it back. `bot` joins it to a stored bot; else a bot that already holds it keeps it, or a + * new one takes it. A person every identity left is hidden, and a move back gives their uid back. */ export const moveToBot = ( context: StoreContext, subject: string | IdentityRef, options: { bot?: string; name?: string; reason?: string } = {}, -): SenderBot => { +): SenderBotDetails => { const { database } = context return write(database, () => { const at = context.now() + settleLegacyBots(database, at) const log = { author: "owner" as const, reason: options.reason ?? null, at } - const chosen = subjectOf(context, subject) - if (isOwner(context, chosen.person)) + const chosen = subjectOf(database, subject) + const people = new Set(chosen.identities.flatMap((one) => holderOf(database, one).person ?? [])) + if ([...people].some((person) => isOwner(context, person))) throw new CliError("validation_error", "the owner's own person is never a bot", { reason: "sender-bot.owner" }) - const target = options.bot === undefined ? undefined : botRow(database, options.bot) - const from = { person: chosen.person, bot: botOfPerson(database, chosen.person) } - const claim = (bot: number) => - database - .prepare("UPDATE sender_bots SET author = 'owner', name = coalesce(?, name), updated_at = ? WHERE id = ?") - .run(options.name ?? null, at, bot) - if (target !== undefined && target.person !== chosen.person) { - const moving = chosen.identity === undefined ? identitiesOf(database, chosen.person) : [chosen.identity] - if (chosen.identity === undefined) { - mergePerson(context, chosen.person, target.person, { method: "bot", by: "owner" }) - if (from.bot !== undefined) database.prepare("DELETE FROM sender_bots WHERE id = ?").run(from.bot) - } else { - move(context, chosen.identity, chosen.person, target.person, { method: "bot", by: "owner" }) - renameAfterLeaving(context, chosen.person, [chosen.identity]) - } - claim(target.id) - logMoves(database, moving, from, { bot: target.id }, log) - return senderBotOf(database, target.id) - } - if (chosen.identity !== undefined && chosen.ref !== undefined) { - const alone = Number(unlinkIdentity(context, chosen.ref, { method: "unlink", by: "owner" }).uid) - const bot = createBot(database, alone, { ...log, name: options.name ?? null }) - logMoves(database, [chosen.identity], from, { bot }, log) - return senderBotOf(database, bot) - } - const held = from.bot ?? createBot(database, chosen.person, { ...log, name: options.name ?? null }) - if (from.bot !== undefined) claim(held) - logMoves(database, identitiesOf(database, chosen.person), from, { bot: held }, log) - return senderBotOf(database, held) + if (chosen.identities.length === 0) + throw new CliError("validation_error", `${String(subject)} holds no identity to move`, { + reason: "sender-bot.empty", + }) + const held = new Set(chosen.identities.flatMap((one) => holderOf(database, one).bot ?? [])) + const target = + options.bot !== undefined + ? botIdOf(database, options.bot) + : (chosen.bot ?? (held.size === 1 && people.size === 0 ? [...held][0] : undefined)) + const bot = target ?? createBot(database, log, options.name ?? null) + database + .prepare("UPDATE sender_bots SET author = 'owner', name = coalesce(?, name), updated_at = ? WHERE id = ?") + .run(options.name ?? null, at, bot) + const left = intoBot(database, chosen.identities, bot, log) + for (const [person, gone] of left) + if (identitiesOf(database, person).length > 0) renameAfterLeaving(context, person, gone) + groupByDomain(database, [{ id: bot, displayName: options.name ?? null, holds: true, bot: true }], at) + return detailsOf(database, bot) }) } /** * The owner's word that a bot, a person or one identity is a person, for its whole history; no rule makes it a bot - * again. `person` joins it to that person; one identity of a bot with others gets a person row of its own. + * again. `person` takes it; else each identity goes back to the person it came from, or a person of its own. Said of a + * person, it keeps them one. Answers the person the first identity is on. */ export const moveToPerson = ( context: StoreContext, @@ -225,39 +548,35 @@ export const moveToPerson = ( const { database } = context return write(database, () => { const at = context.now() + settleLegacyBots(database, at) const log = { author: "owner" as const, reason: options.reason ?? null, at } - const chosen = subjectOf(context, subject) - const bot = botOfPerson(database, chosen.person) - const from = { person: chosen.person, bot } - const target = options.person === undefined ? undefined : personRow(database, options.person) - if (target !== undefined && botOfPerson(database, target) !== undefined) - throw new CliError("validation_error", `${options.person} is a bot; name a person`, { - reason: "sender-bot.not-a-person", - reference: options.person, + const chosen = subjectOf(database, subject) + const target = options.person === undefined ? undefined : personIdOf(database, options.person) + if (chosen.identities.length === 0) + throw new CliError("validation_error", `${String(subject)} holds no identity to move`, { + reason: "sender-bot.empty", }) - if (target !== undefined && target !== chosen.person) { - const moving = chosen.identity === undefined ? identitiesOf(database, chosen.person) : [chosen.identity] - if (chosen.identity === undefined) mergePerson(context, chosen.person, target, { method: "manual", by: "owner" }) - else { - move(context, chosen.identity, chosen.person, target, { method: "manual", by: "owner" }) - renameAfterLeaving(context, chosen.person, [chosen.identity]) - } - if (bot !== undefined && identitiesOf(database, chosen.person).length === 0) - database.prepare("DELETE FROM sender_bots WHERE id = ?").run(bot) - releaseDomainHolds(database, moving) - logMoves(database, moving, from, { person: target }, log) + if (chosen.person !== undefined && target !== undefined && target !== chosen.person) { + for (const identity of chosen.identities) + logMove(database, identity, { person: chosen.person }, { person: target }, log) + mergePerson(context, chosen.person, target, { method: "manual", by: "owner" }) return recordOf(context, target) } - if (chosen.identity !== undefined && chosen.ref !== undefined && bot !== undefined) { - const alone = Number(unlinkIdentity(context, chosen.ref, { method: "unlink", by: "owner" }).uid) - releaseDomainHolds(database, [chosen.identity]) - logMoves(database, [chosen.identity], from, { person: alone }, log) - return recordOf(context, alone) + const went = outOfBot(database, chosen.identities, target, log) + for (const identity of chosen.identities) { + if (went.has(identity)) continue + const person = holderOf(database, identity).person + if (person === undefined) continue + const to = target ?? person + if (to !== person) { + move(context, identity, person, to, { method: "manual", by: "owner" }) + renameAfterLeaving(context, person, [identity]) + } + logMove(database, identity, { person }, { person: to }, log) + went.set(identity, to) } - if (bot !== undefined) database.prepare("DELETE FROM sender_bots WHERE id = ?").run(bot) - const moving = chosen.identity === undefined ? identitiesOf(database, chosen.person) : [chosen.identity] - releaseDomainHolds(database, moving) - logMoves(database, moving, from, { person: chosen.person }, log) - return recordOf(context, chosen.person) + releaseDomainHolds(database, chosen.identities) + const first = went.get(chosen.identities[0] as number) + return recordOf(context, first ?? target ?? (chosen.person as number)) }) } diff --git a/src/store/sqlite/sender-signals.ts b/src/store/sqlite/sender-signals.ts index ab6e2f1af..e3294275c 100644 --- a/src/store/sqlite/sender-signals.ts +++ b/src/store/sqlite/sender-signals.ts @@ -92,15 +92,23 @@ export const LIST_SENDERS = const senderKey = (address: string) => address.toLowerCase().replace(/\+[^@]*@/, "@") /** - * The mail each of these people sent the owner, as `senderSignalsOf` reads it. Asked for a page of people only: the - * senders of their List-Ids tell a discussion list from a newsletter. + * The mail each of these people, or sender bots, sent the owner, as `senderSignalsOf` reads it. Asked for a page + * only: the senders of their List-Ids tell a discussion list from a newsletter. */ -export const sentMailOf = (database: CacheDatabase, people: readonly number[]): Map => { +export const sentMailOf = ( + database: CacheDatabase, + people: readonly number[], + holder: "person" | "bot" = "person", +): Map => { const found = new Map() if (people.length === 0) return found + const held = + holder === "person" + ? { owner: "l.person_id", join: "identity_links l" } + : { owner: "l.bot_id", join: "sender_bot_identities l" } const rows = database .prepare( - "SELECT l.person_id AS person, " + + `SELECT ${held.owner} AS person, ` + `${LIST_ID} AS list, json_extract(e.headers, '$."auto-submitted"') IS NOT NULL AS auto, ` + "json_extract(e.headers, '$.\"null-return-path\"') IS 1 AS null_return, " + "json_extract(e.headers, '$.\"list-unsubscribe-post\"') IS 1 AS one_click, " + @@ -109,8 +117,8 @@ export const sentMailOf = (database: CacheDatabase, people: readonly number[]): "WHERE m.email_id = e.id AND b.kind = 'bulk') AS bulk, " + "CASE WHEN json_extract(e.metadata, '$.rule') IS NOT NULL THEN NULL ELSE " + "(SELECT count(*) FROM email_recipients r WHERE r.email_id = e.id AND r.role IN ('to', 'cc')) END AS recipients " + - "FROM emails e JOIN identity_links l ON l.identity_id = e.from_identity_id " + - "WHERE e.outgoing IS NOT 1 AND e.deleted_at IS NULL AND l.person_id IN (SELECT value FROM json_each(?))", + `FROM emails e JOIN ${held.join} ON l.identity_id = e.from_identity_id ` + + `WHERE e.outgoing IS NOT 1 AND e.deleted_at IS NULL AND ${held.owner} IN (SELECT value FROM json_each(?))`, ) .all(JSON.stringify(people)) const lists = [...new Set(rows.flatMap((row) => (typeof row.list === "string" ? [row.list] : [])))] diff --git a/src/store/version-75.test.ts b/src/store/version-75.test.ts new file mode 100644 index 000000000..2889cb6a4 --- /dev/null +++ b/src/store/version-75.test.ts @@ -0,0 +1,129 @@ +import { mkdtempSync } from "node:fs" +import { tmpdir } from "node:os" +import { join } from "node:path" +import { afterEach, expect, it } from "vitest" +import { rollBackTo } from "../testing/older-store.js" +import type { CacheDatabase } from "./driver.js" +import { openCache } from "./open.js" +import { LIST_SENDERS } from "./sqlite/sender-signals.js" +import { type AccountKey, type MessageStore, openStore } from "./store.js" + +const TG: AccountKey = { provider: "telegram", account: "1" } +const MAIL: AccountKey = { provider: "email", account: "me@acme.ru" } + +const handles: { close(): unknown }[] = [] +afterEach(async () => { + for (const handle of handles.splice(0)) await handle.close() +}) + +const opened = async (path = join(mkdtempSync(join(tmpdir(), "version-75-")), "store.db")) => { + const store = await openStore({ path }) + handles.push(store) + await store.people.savePeople(TG, [{ id: "1", name: "Me" }]) + await store.people.linkToOwner({ provider: "telegram", id: "1" }) + await store.accounts.saveAccount(MAIL, { name: null }) + const db = await openCache(path) + handles.push(db) + return { store, db, path } +} + +const bots = async (store: MessageStore) => + (await store.people.listBots({ limit: 100 })).items.map(({ displayName, identities, author }) => ({ + displayName, + identities: identities.map(({ provider, id }) => `${provider}:${id}`), + author, + })) + +const count = (db: CacheDatabase, sql: string) => Number(db.prepare(sql).get()?.n) + +it("moves a version 74 store's bots off their people, and an older build's writes keep them apart", async () => { + const { store, db, path } = await opened() + await store.people.savePeople(MAIL, [ + { id: "noreply@service.ru", name: "Service" }, + { id: "pat@later.ru", name: "Pat Later" }, + ]) + await store.close() + handles.splice(handles.indexOf(store), 1) + db.close() + handles.splice(handles.indexOf(db), 1) + const old = await openCache(path) + rollBackTo(old, 75) + const service = Number( + old + .prepare( + "SELECT person_id FROM identity_links l JOIN identities i ON i.id = l.identity_id WHERE i.external_id = ?", + ) + .get("noreply@service.ru")?.person_id, + ) + old + .prepare( + "INSERT INTO sender_bots (person_id, name, author, reason, created_at, updated_at) " + + "VALUES (?, 'Service bot', 'owner', 'a program', 1, 1)", + ) + .run(service) + old.close() + + const upgraded = await openStore({ path }) + handles.push(upgraded) + const after = await openCache(path) + handles.push(after) + + expect(await bots(upgraded)).toEqual( + expect.arrayContaining([{ displayName: "Service bot", identities: ["email:noreply@service.ru"], author: "owner" }]), + ) + expect(after.prepare("SELECT kind FROM persons WHERE id = ?").get(service)).toEqual({ kind: "merged" }) + // A 1.0 build that works the kind out again stores the person's kind: it stays hidden. + after.prepare("UPDATE persons SET kind = 'automated' WHERE id = ?").run(service) + expect(after.prepare("SELECT kind FROM persons WHERE id = ?").get(service)).toEqual({ kind: "merged" }) + expect(count(after, "SELECT count(*) AS n FROM sender_bots WHERE person_id > 0")).toBe(0) + const identity = Number(after.prepare("SELECT id FROM identities WHERE external_id = 'noreply@service.ru'").get()?.id) + + // A 1.0 build's sync: a person for the identity with no link, its link and the log row, as `ensurePerson` writes. + const persons = count(after, "SELECT count(*) AS n FROM persons") + const made = Number( + after.prepare("INSERT INTO persons (name, created_at, updated_at) VALUES ('Service', 2, 2) RETURNING id").get()?.id, + ) + after + .prepare( + "INSERT INTO identity_links (identity_id, person_id, method, confidence, created_at, author, updated_at) " + + "VALUES (?, ?, 'initial', 1, 2, 'ingest', 2)", + ) + .run(identity, made) + after + .prepare( + "INSERT INTO identity_link_events (identity_id, from_person_id, to_person_id, method, created_at, author) " + + "VALUES (?, NULL, ?, 'initial', 2, 'ingest')", + ) + .run(identity, made) + expect(count(after, "SELECT count(*) AS n FROM persons")).toBe(persons) + expect(after.prepare("SELECT 1 FROM identity_links WHERE identity_id = ?").get(identity)).toBeUndefined() + + // A 1.0 build gives a rule's bot back by deleting its row, and sorts a new one onto a person row. + const held = Number( + after.prepare("SELECT bot_id FROM sender_bot_identities WHERE identity_id = ?").get(identity)?.bot_id, + ) + after.prepare("DELETE FROM sender_bots WHERE id = ?").run(held) + expect(after.prepare("SELECT 1 FROM sender_bots WHERE id = ?").get(held)).toBeDefined() + const later = Number( + after + .prepare( + "SELECT person_id FROM identity_links l JOIN identities i ON i.id = l.identity_id WHERE i.external_id = ?", + ) + .get("pat@later.ru")?.person_id, + ) + after + .prepare( + "INSERT INTO sender_bots (person_id, author, reason, created_at, updated_at) VALUES (?, 'rules', 'no-reply', 3, 3)", + ) + .run(later) + + expect((await bots(upgraded)).map(({ identities }) => identities)).toEqual( + expect.arrayContaining([["email:pat@later.ru"]]), + ) + expect(count(after, "SELECT count(*) AS n FROM sender_bots WHERE person_id > 0")).toBe(0) + const plan = after + .prepare(`EXPLAIN QUERY PLAN ${LIST_SENDERS}`) + .all('[""]') + .map((row) => String(row.detail)) + expect(plan.join(" ")).toContain("emails_by_list_id") +}) diff --git a/src/testing/older-store.ts b/src/testing/older-store.ts index 04f63de21..b8e4ac0ab 100644 --- a/src/testing/older-store.ts +++ b/src/testing/older-store.ts @@ -3,6 +3,12 @@ import { VERSION_72_TABLES as VERSION_72 } from "./version-72-tables.js" // What a migration created that replaying it would create again; a migration that only updates rows needs nothing. const UNDO: Record = { + 75: + "DROP TRIGGER person_kind_sender_bot_origin_au; DROP TRIGGER sender_bot_identity_link_bi; " + + "DROP TRIGGER sender_bot_identity_person_ai; DROP TRIGGER sender_bot_identities_linked_bi; " + + "DROP TRIGGER sender_bots_holding_bd; DROP TRIGGER sender_bot_identities_identity_ad; " + + "DROP TRIGGER sender_bots_emptied_ad; DROP TRIGGER sender_bots_emptied_au; " + + "DROP INDEX sender_bot_moves_by_from_person_id; DROP TABLE sender_bot_identities;", 74: "DROP TRIGGER sender_bots_person_ad; DROP TRIGGER sender_bots_organization_ad; " + "DROP TRIGGER sender_bot_moves_identity_ad; DROP TRIGGER person_kind_sender_bot_ai; " + From 9176fcd0c8eeaf16cbce498949fb84fa612eb0bc Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 25 Nov 2026 12:40:38 +0100 Subject: [PATCH 2/3] fix(people): keep one holder through re-keys, purges and a 1.0 build's sort - A re-key onto an identity a bot holds no longer gives it a link too: a trigger takes the moved link off and logs the move, and a bot whose identity is re-keyed onto a person's takes the one that stays. - An account purge removes the person rows its bots emptied, as it removes a purged identity's person. - A bot a 1.0 build sorts onto a person row is settled on the next writable list even when every stored kind is current: that build keeps the kinds it worked out, so nothing else brought the bot here. Checked against cli-core 1.0.0 itself: it syncs, lists, scans and purges a version 75 store without an identity held twice, an empty person left visible or a bot lost. Co-Authored-By: Claude Opus 5.5 --- .../migration.sql | 10 +++++ src/store/sender-bots.test.ts | 40 +++++++++++++++++++ src/store/sqlite/accounts.ts | 4 +- src/store/sqlite/identity-rekey.ts | 2 + src/store/sqlite/migrations.generated.ts | 1 + src/store/sqlite/people-list.ts | 5 ++- src/store/sqlite/sender-bots.ts | 14 +++++++ src/store/version-75.test.ts | 2 + src/testing/older-store.ts | 1 + 9 files changed, 77 insertions(+), 2 deletions(-) diff --git a/drizzle/20261125111118_version-75-bot-identities-moved/migration.sql b/drizzle/20261125111118_version-75-bot-identities-moved/migration.sql index 4009a14b7..0455fec00 100644 --- a/drizzle/20261125111118_version-75-bot-identities-moved/migration.sql +++ b/drizzle/20261125111118_version-75-bot-identities-moved/migration.sql @@ -32,6 +32,16 @@ WHEN EXISTS (SELECT 1 FROM sender_bot_identities WHERE identity_id = NEW.identit SELECT RAISE(IGNORE); END; --> statement-breakpoint +-- A re-key moves a person's link onto an identity a bot holds: the bot keeps it, and the move is logged. +CREATE TRIGGER sender_bot_identity_link_au AFTER UPDATE OF identity_id ON identity_links +WHEN EXISTS (SELECT 1 FROM sender_bot_identities WHERE identity_id = NEW.identity_id) BEGIN + INSERT INTO sender_bot_moves (identity_id, from_person_id, from_bot_id, to_person_id, to_bot_id, author, reason, created_at) + SELECT NEW.identity_id, NEW.person_id, NULL, NULL, s.bot_id, 'rules', 'the source re-keyed the identity', + CAST(unixepoch('subsec') * 1000 AS INTEGER) + FROM sender_bot_identities s WHERE s.identity_id = NEW.identity_id; + DELETE FROM identity_links WHERE identity_id = NEW.identity_id; +END; +--> statement-breakpoint -- ...and the person row it made for it, with its log row, goes again. CREATE TRIGGER sender_bot_identity_person_ai AFTER INSERT ON identity_link_events WHEN NEW.from_person_id IS NULL diff --git a/src/store/sender-bots.test.ts b/src/store/sender-bots.test.ts index 3c0d5943a..17d490d53 100644 --- a/src/store/sender-bots.test.ts +++ b/src/store/sender-bots.test.ts @@ -229,8 +229,12 @@ it("lets an account purge take a bot's rows with its identities", async () => { ]) expect(await bots(store)).toHaveLength(2) + const persons = count(db, "SELECT count(*) AS n FROM persons") + await store.accounts.purge(TG) + // The person rows the bots emptied go with them, as a purged identity's person does. + expect(count(db, "SELECT count(*) AS n FROM persons")).toBe(persons - 2) expect(count(db, "SELECT count(*) AS n FROM sender_bots")).toBe(0) expect(count(db, "SELECT count(*) AS n FROM sender_bot_identities")).toBe(0) expect(count(db, "SELECT count(*) AS n FROM sender_bot_moves")).toBe(0) @@ -270,3 +274,39 @@ it("finds bots by name and address and by the organization of their domain", asy details: { reason: "query.short-text" }, }) }) + +it("keeps one holder through a re-key: the bot takes the identity that stays, from either side", async () => { + const { store, db } = await opened() + const held = (id: string) => + db + .prepare( + "SELECT (SELECT count(*) FROM identity_links l WHERE l.identity_id = i.id) AS links, " + + "(SELECT count(*) FROM sender_bot_identities s WHERE s.identity_id = i.id) AS bots " + + "FROM identities i WHERE i.provider = 'telegram' AND i.external_id = ?", + ) + .get(id) + await store.people.savePeople(TG, [ + { id: "80", name: "Old Bot", isBot: true }, + { id: "81", name: "New Bot" }, + { id: "90", name: "Old Kim" }, + { id: "91", name: "New Kim" }, + ]) + const kim = await uidOf(store, "telegram", "90") + await store.people.list({ limit: 0 }) + const [bot] = (await store.people.listBots({ limit: 10 })).items + const other = await store.people.moveToBot({ provider: "telegram", id: "91" }, "owner") + + await store.people.rekeyIdentities("telegram", [ + { from: "80", to: "81" }, + { from: "90", to: "91" }, + ]) + + expect(held("81")).toEqual({ links: 0, bots: 1 }) + expect(held("91")).toEqual({ links: 0, bots: 1 }) + expect((await store.people.showBot(String(bot?.bot))).identities.map(({ id }) => id)).toEqual(["81"]) + expect((await store.people.showBot(other.bot)).identities.map(({ id }) => id)).toEqual(["91"]) + expect(await people(store)).not.toContain("Old Kim") + expect((await store.people.showBot(other.bot)).moves).toEqual( + expect.arrayContaining([expect.objectContaining({ from: kim, reason: "the source re-keyed the identity" })]), + ) +}) diff --git a/src/store/sqlite/accounts.ts b/src/store/sqlite/accounts.ts index f56be3c55..2dccf324a 100644 --- a/src/store/sqlite/accounts.ts +++ b/src/store/sqlite/accounts.ts @@ -197,9 +197,11 @@ export const dropOrphanPeople = (database: CacheDatabase, unseenBefore: Set Number(id)) for (const table of ["identity_revisions", "identity_link_events", "identity_links"]) database.prepare(`DELETE FROM ${table} WHERE identity_id IN (SELECT value FROM json_each(?))`).run(gone) diff --git a/src/store/sqlite/identity-rekey.ts b/src/store/sqlite/identity-rekey.ts index a396724e2..a0c5821e0 100644 --- a/src/store/sqlite/identity-rekey.ts +++ b/src/store/sqlite/identity-rekey.ts @@ -5,6 +5,7 @@ import { pointerPairs } from "./entity-types.js" import { settleLinks } from "./identity-link-rows.js" import type { StoreContext } from "./open.js" import { mergePerson } from "./person-links.js" +import { rekeyIntoBot } from "./sender-bots.js" import { write } from "./transaction.js" export type IdentityRekeyOutcome = "renamed" | "merged" | "unchanged" | "skipped" @@ -197,6 +198,7 @@ export const rekeyIdentity = ( return "renamed" } const keptId = Number(kept.id) + rekeyIntoBot(database, oldId, keptId, context.now()) const [mine, theirs] = [personOfIdentity(database, oldId), personOfIdentity(database, keptId)] if (mine !== undefined && theirs !== undefined && mine !== theirs) persons.push(mergePerson(context, mine, theirs, { method: "identity-rekey", by })) diff --git a/src/store/sqlite/migrations.generated.ts b/src/store/sqlite/migrations.generated.ts index fe17fd906..c57373d34 100644 --- a/src/store/sqlite/migrations.generated.ts +++ b/src/store/sqlite/migrations.generated.ts @@ -2133,6 +2133,7 @@ export const GENERATED: { name: string; statements: string[] }[] = [ "-- Stored as a merge's emptied person is, so every build's people list leaves it out.\nCREATE TRIGGER person_kind_sender_bot_origin_au AFTER UPDATE OF kind ON persons\nWHEN NEW.kind IS NOT 'merged' AND NEW.owner = 0\n AND NOT EXISTS (SELECT 1 FROM identity_links WHERE person_id = NEW.id)\n AND EXISTS (SELECT 1 FROM sender_bot_moves WHERE from_person_id = NEW.id AND to_bot_id IS NOT NULL) BEGIN\n UPDATE persons SET kind = 'merged' WHERE id = NEW.id;\nEND;", "UPDATE persons SET kind = 'merged' WHERE owner = 0\n AND NOT EXISTS (SELECT 1 FROM identity_links WHERE person_id = persons.id)\n AND EXISTS (SELECT 1 FROM sender_bot_moves WHERE from_person_id = persons.id AND to_bot_id IS NOT NULL);", "-- An older build's sync links an identity with no person to a new one: a bot's identity gets none.\nCREATE TRIGGER sender_bot_identity_link_bi BEFORE INSERT ON identity_links\nWHEN EXISTS (SELECT 1 FROM sender_bot_identities WHERE identity_id = NEW.identity_id) BEGIN\n SELECT RAISE(IGNORE);\nEND;", + "-- A re-key moves a person's link onto an identity a bot holds: the bot keeps it, and the move is logged.\nCREATE TRIGGER sender_bot_identity_link_au AFTER UPDATE OF identity_id ON identity_links\nWHEN EXISTS (SELECT 1 FROM sender_bot_identities WHERE identity_id = NEW.identity_id) BEGIN\n INSERT INTO sender_bot_moves (identity_id, from_person_id, from_bot_id, to_person_id, to_bot_id, author, reason, created_at)\n SELECT NEW.identity_id, NEW.person_id, NULL, NULL, s.bot_id, 'rules', 'the source re-keyed the identity',\n CAST(unixepoch('subsec') * 1000 AS INTEGER)\n FROM sender_bot_identities s WHERE s.identity_id = NEW.identity_id;\n DELETE FROM identity_links WHERE identity_id = NEW.identity_id;\nEND;", "-- ...and the person row it made for it, with its log row, goes again.\nCREATE TRIGGER sender_bot_identity_person_ai AFTER INSERT ON identity_link_events\nWHEN NEW.from_person_id IS NULL\n AND EXISTS (SELECT 1 FROM sender_bot_identities WHERE identity_id = NEW.identity_id)\n AND NOT EXISTS (SELECT 1 FROM identity_links WHERE person_id = NEW.to_person_id) BEGIN\n DELETE FROM identity_link_events WHERE id = NEW.id;\n DELETE FROM persons WHERE id = NEW.to_person_id AND owner = 0\n AND NOT EXISTS (SELECT 1 FROM identity_link_events WHERE from_person_id = NEW.to_person_id OR to_person_id = NEW.to_person_id);\nEND;", "CREATE TRIGGER sender_bot_identities_linked_bi BEFORE INSERT ON sender_bot_identities\nWHEN EXISTS (SELECT 1 FROM identity_links WHERE identity_id = NEW.identity_id) BEGIN\n SELECT RAISE(ABORT, 'sender_bot_identities: the identity is linked to a person; unlink it first');\nEND;", "-- An older build gives a bot back by deleting its row; one that still holds identities stays.\nCREATE TRIGGER sender_bots_holding_bd BEFORE DELETE ON sender_bots\nWHEN EXISTS (SELECT 1 FROM sender_bot_identities WHERE bot_id = OLD.id) BEGIN\n SELECT RAISE(IGNORE);\nEND;", diff --git a/src/store/sqlite/people-list.ts b/src/store/sqlite/people-list.ts index da6994ced..fdd94a601 100644 --- a/src/store/sqlite/people-list.ts +++ b/src/store/sqlite/people-list.ts @@ -19,7 +19,7 @@ import { fold } from "../normalize.js" import { groupByDomain, type Sorted } from "./domain-organizations.js" import { mergedAwaySql } from "./merged-persons.js" import { ALWAYS_SHOWN, type ShownBecause, shownReasons } from "./person-ties.js" -import { ownerPeopleOf, ruleBotsBack, ruleToBot, settleLegacyBots } from "./sender-bots.js" +import { hasLegacyBots, ownerPeopleOf, ruleBotsBack, ruleToBot, settleLegacyBots } from "./sender-bots.js" import { type Reach, type SenderSignal, senderSignalsOf, sentMailOf } from "./sender-signals.js" import { mergedAssignees } from "./task-board.js" import { hiddenTestPeople } from "./test-people.js" @@ -581,6 +581,9 @@ const keep = (database: CacheDatabase, worked: Worked[]): void => { * Answers whether every stored one is current. */ export const storeKinds = (database: CacheDatabase): boolean => { + // A 1.0 build keeps the kinds of the people it sorts onto a bot, so nothing else would bring their bot here. + if (!isQueryOnly(database) && hasLegacyBots(database)) + writeBatch(database, () => settleLegacyBots(database, Date.now())) if (isQueryOnly(database)) return ( rulesOf(database) === KIND_RULES && diff --git a/src/store/sqlite/sender-bots.ts b/src/store/sqlite/sender-bots.ts index a83845c95..ec1993257 100644 --- a/src/store/sqlite/sender-bots.ts +++ b/src/store/sqlite/sender-bots.ts @@ -222,6 +222,16 @@ const outOfBot = (database: CacheDatabase, identities: readonly number[], to: nu return went } +/** + * The source re-keyed `from` onto `to`, both stored: a bot holding `from` takes `to` from its person, since one + * account is one program. The person it leaves is hidden as `intoBot` hides one. The caller holds the write lock. + */ +export const rekeyIntoBot = (database: CacheDatabase, from: number, to: number, at: number): void => { + const bot = holderOf(database, from).bot + if (bot === undefined || holderOf(database, to).bot !== undefined) return + intoBot(database, [to], bot, { author: "rules", reason: "the source re-keyed the identity", at }) +} + /** People holding an identity the owner last moved to a person, or kept as one: no rule makes them a bot. */ export const ownerPeopleOf = (database: CacheDatabase): Set => new Set( @@ -280,6 +290,10 @@ export const ruleBotsBack = (database: CacheDatabase, at: number): void => { for (const row of back) outOfBot(database, botIdentitiesOf(database, Number(row.id)), undefined, log) } +/** Whether a build before version 75 sorted a bot onto a person row since the last kept list. */ +export const hasLegacyBots = (database: CacheDatabase): boolean => + database.prepare("SELECT 1 FROM sender_bots WHERE person_id > 0 LIMIT 1").get() !== undefined + /** * A bot a build before version 75 sorted after the upgrade holds its person row's identities there: they move to the * bot, as the upgrade moved the others. The caller holds the write lock. diff --git a/src/store/version-75.test.ts b/src/store/version-75.test.ts index 2889cb6a4..4d094f1fa 100644 --- a/src/store/version-75.test.ts +++ b/src/store/version-75.test.ts @@ -116,6 +116,8 @@ it("moves a version 74 store's bots off their people, and an older build's write "INSERT INTO sender_bots (person_id, author, reason, created_at, updated_at) VALUES (?, 'rules', 'no-reply', 3, 3)", ) .run(later) + // ...and stores the kinds it worked out, so no stored kind is left to work out. + after.prepare("UPDATE persons SET kind = 'automated' WHERE id = ?").run(later) expect((await bots(upgraded)).map(({ identities }) => identities)).toEqual( expect.arrayContaining([["email:pat@later.ru"]]), diff --git a/src/testing/older-store.ts b/src/testing/older-store.ts index b8e4ac0ab..7cd733c43 100644 --- a/src/testing/older-store.ts +++ b/src/testing/older-store.ts @@ -5,6 +5,7 @@ import { VERSION_72_TABLES as VERSION_72 } from "./version-72-tables.js" const UNDO: Record = { 75: "DROP TRIGGER person_kind_sender_bot_origin_au; DROP TRIGGER sender_bot_identity_link_bi; " + + "DROP TRIGGER sender_bot_identity_link_au; " + "DROP TRIGGER sender_bot_identity_person_ai; DROP TRIGGER sender_bot_identities_linked_bi; " + "DROP TRIGGER sender_bots_holding_bd; DROP TRIGGER sender_bot_identities_identity_ad; " + "DROP TRIGGER sender_bots_emptied_ad; DROP TRIGGER sender_bots_emptied_au; " + From a87f76e27fa07b7b7c7a74b15a698e84dee5f69b Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 25 Nov 2026 12:48:46 +0100 Subject: [PATCH 3/3] docs(coordination): store version 75 is taken by bots as their own entity Co-Authored-By: Claude Opus 5.5 --- docs/dev/ARCHITECTURE.md | 13 ++++++++----- docs/dev/COORDINATION.md | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/dev/ARCHITECTURE.md b/docs/dev/ARCHITECTURE.md index eee972c9d..d328cbac5 100644 --- a/docs/dev/ARCHITECTURE.md +++ b/docs/dev/ARCHITECTURE.md @@ -701,8 +701,8 @@ proposes them instead. A no-reply address (`isNoReplyAddress`) is no one's: it n move a person's identities to a new bot by rule when their kind is `automated` by a program's signal (`PROGRAM_SIGNALS`: the platform's bot flag, a no-reply or notification address, a signed `Auto-Submitted`, an empty Return-Path, `bulk_never_replied`), the owner wrote them nothing (no mail tie, no private chat both wrote in; the - platform's flag holds against both), no `ALWAYS_SHOWN` reason holds, and every identity of theirs is the program's, - or they have one. A name or a bulk mailbox alone marks a person `automated` and moves nothing: a newsletter a human + platform's flag holds against both), no `ALWAYS_SHOWN` reason holds, and every identity of theirs is the program's, or + they have one. A name or a bulk mailbox alone marks a person `automated` and moves nothing: a newsletter a human writes stays a person. A rule's bot goes back to the people its identities came from once the owner writes to it (`ruleBotsBack`). The owner's `moveToBot` and `moveToPerson` move a person, a bot or one identity for its whole history, and win over the rules and every `KIND_RULES` bump: a bot the owner made has `author = 'owner'`, and an @@ -713,9 +713,12 @@ proposes them instead. A no-reply address (`isNoReplyAddress`) is no one's: it n identities. `sender_bots.person_id` only keeps builds before version 75 from reading a bot as a person: negative since. Those builds still write to a migrated store, so triggers keep them apart: a bot's identity gets no link to a person (`RAISE(IGNORE)`), the person row their ingest made for it goes again, a bot holding identities is not deleted, - and a hidden person's kind stays `merged`. A positive `person_id` is a bot such a build sorted after the upgrade; the - next kept list moves its identities to it (`settleLegacyBots`). No table has a foreign key, so an older build purging - an account still can; triggers drop a bot's rows with its last identity. + a re-keyed link onto a bot's identity moves to the bot, and a hidden person's kind stays `merged` (checked against + cli-core 1.0.0 itself). A re-key of a bot's identity onto a person's gives the bot the one that stays + (`rekeyIntoBot`), and a purge removes the person rows its bots emptied. A positive `person_id` is a bot such a build + sorted after the upgrade; the next writable list moves its identities to it (`settleLegacyBots`), even when every + stored kind is current. No table has a foreign key, so an older build purging an account still can; triggers drop a + bot's rows with its last identity. - **Organizations from mail domains** (`domain-organizations.ts`, plan step 5): when kinds are kept, a bot or a shared mailbox (every address a role address) at a company domain joins the organization of its registrable domain (`registrableOf`, so `mail.bank.example` is `bank.example`): the organization already holding an address there, else diff --git a/docs/dev/COORDINATION.md b/docs/dev/COORDINATION.md index c696b8dd0..49421584b 100644 --- a/docs/dev/COORDINATION.md +++ b/docs/dev/COORDINATION.md @@ -4,7 +4,7 @@ Several sessions work on cli-core, tg-cli and max-cli at once. This page is what ## Store migrations -**The next free migration version is 77.** Version 76 is reserved for mail types (`emails.mail_type`, `emails.reach` and `emails.type_signal`: each email's own type, such as order, newsletter or personal, how it reached the owner and the signal that decided it, worked out lazily from the stored headers, recipients, attachment types, the sender's bot and organization sector and the owner's own mail, and nulled by triggers on those inputs; a partial index over the emails still to work out and an index for filtering by type; columns, indexes and triggers added only, forward-only, `minCompatible` stays 73; contact-kinds plan, "Mail categories", owner's rulings 2026-11-25). Version 75 is reserved for bots as their own entity (`sender_bot_identities`: an identity belongs to exactly one person or one sender bot, never both, and a bot's identities leave `identity_links`; `sender_bots` rows and their person's identities move to the bot, the person row they came from kept but hidden, so moving back restores it; triggers keep an older build from giving a bot's identity a person again; tables and triggers added only, forward-only, `minCompatible` stays 73 unless 1.0.0's writes cannot be made safe by triggers, which the migration's pull request says; contact-kinds plan step 3 in its full form, owner's ruling, 2026-11-25). Version 74 is reserved for sender bots (`sender_bots`: a program that writes to the owner, kept apart from people, with the person row it was sorted from, an optional organization, `rules` or `owner` as author; `sender_bot_moves`, every move of an identity between a person and a bot with who and why; triggers that drop their rows with a person, an identity or an organization, since neither table has a foreign key, and clear the person's stored kind; the index `emails_by_list_id` over the List-Id the people list reads; tables, an index and triggers added only, forward-only, `minCompatible` unchanged; contact-kinds plan steps 3 and 4, cli-core#3314, owner's ruling NEED-109 A; it merges after version 73, reserved in the same pull request as version 72 was, announced on issue #3157). Version 73 is taken by cli-core 1.0's store (every base table with an integer `id`, 101 of them, copied once to become `AUTOINCREMENT`, each counter started 1,000 above the largest id the store still knows; `CHECK`s for valid JSON in JSON columns, whole-or-empty pointer pairs and non-negative amounts; the index `taggings_by_taggable_type_taggable_id`; the runner turns foreign keys off before `BEGIN` for a migration that copies tables, puts back their triggers and indexes and checks their foreign keys before `COMMIT`; it raises `minCompatible` to 73 and refuses to run without a rollback copy unless `store migrate --no-backup`; owner's ruling NEED-2872 A, cli-core 1.0 plan phase 4, 2026-11-23). Version 72 is taken by document history (`document_revisions.title`, `front_matter` and `reason`, so a version keeps what the document was and why it was replaced: edited, deleted, unavailable or unsynced. `documents.removal`, why a removed document left the copy, its text kept when unavailable. `document_changes`, the change log of synced documents with no foreign key, and the trigger `document_changes_account_bd` that drops an account's rows with it. Columns, a table, an index and a trigger added only, forward-only, `minCompatible` stays 56. IDEA-2862 in cli-private's Notion roadmap, owner's answers NEED-2802, NEED-2803 A and NEED-2805, 2026-11-23. Reserved in the same pull request, as version 67 was, announced on issue #3157). Version 71 is reserved for the content category (`content_channels`, `content_authors`, `content_terms`, `content_posts` with the body as Markdown and its hash and its terms, authors and media as JSON (no `content_post_terms`: a post is found by a term through its JSON and its taggings), `content_post_revisions` (the title, body and status a sync or a write replaced, and a post the source deleted, kept before the change), `content_metrics` (snapshots in time, never overwritten) and the contentless word index `content_post_words` kept by triggers; a post becomes a taggable type `post`, with a trigger that drops its taggings when the post row goes; blog posts and pages of a site such as WordPress, later social posts; tables, indexes and triggers added only, forward-only, `minCompatible` stays 56; content category plan C5 in cli-private, owner's ruling NEED-2722 A, 2026-11-18). Version 70 is reserved for the tracker category (`tracker_items`: one row per team, user, workflow state, label, project, issue or comment of an issue tracker account such as Linear, with its source id, parent, title, text, source times, archive and deletion marks and the rest as JSON; `tracker_item_words`, a contentless word index over titles and text kept by triggers; tables, indexes and triggers added only, forward-only, `minCompatible` stays 56; owner's ruling NEED-2717 A, source-manifest plan L3 in cli-private, 2026-11-17). Version 69 is reserved for stored conversation readiness (`conversation_readiness`: per built chat and embedding model, the counts `search conversations` reports — messages new, edited or deleted since the build, chunks with current, stale and missing vectors — saved when first counted and dropped by triggers when the chat's messages, revisions, build or that model's vectors change, so a search reads them instead of recounting every chat; table and triggers added only, forward-only, `minCompatible` stays 56; owner's ruling NEED-63 A, 2026-11-17). Version 68 is taken by CRM client files (`crm_files`: one row per downloaded file of a deal, lead, contact or company, with its owner record, source kind, name, size, type, local path and extracted text in its own word index, never a download link; CRM files plan in cli-private, 2026-11-16). Version 67 is taken by the facts removal log and phone-call fields on meetings (`fact_removals`: one row per removed fact with its id, the reference of what it was about, who removed it, when and why, never its text or value; `meetings.direction` and `client_phone`, set by a phone-line source; table, columns and indexes added only, forward-only, `minCompatible` stays 56; owner's rulings NEED-2614 B and the call-fields decision A, 2026-11-13; reserved in the same pull request under the one-PR rule for that round, announced on issue #849). Version 66 is reserved for the person-kind trigger on account names (`person_kind_identity_au` recreated to watch `identities.name` too, so a person with no name of their own has their kind and name order worked out again when an account's name changes; triggers only, forward-only, `minCompatible` stays 56; RISK-2268, 2026-11-11). Version 65 is taken by titles of found tasks (the migration sets a `store_settings` key only in a store holding a task still titled ` — `, and the next writable open gives each such task the first line of its source message, as `tasks list` already shows it, in batches, then deletes the key; tasks whose message is missing, deleted or empty keep their title; no schema change, forward-only, `minCompatible` stays 56; owner's ruling NEED-2517 B, 2026-11-10). Version 64 is taken by faster person-kind triggers on deal links (`person_kind_deal_link_ai`, `_ad` and `_au` recreated so their lookup of a deal's other links uses the `(from_type, from_id)` index, and `person_kind_deal_owner_moved_au` and `_owner_person_au` so they find the owner's links by person; version 63's read every person link per row, about 24 ms each on 118k links; triggers only, forward-only, `minCompatible` stays 56; removing CRM contacts outside the scope, owner's ruling 2026-11-10). Version 63 is reserved for people's ties from messages and CRM deals (triggers that clear a stored person kind when a deal or lead names the person or changes its owner, and when a chat whose message senders count as ties changes kind or crosses the small-group size; triggers only, forward-only, `minCompatible` stays 56; BUG-676 and the owner's ruling NEED-2500 A, 2026-11-10). Version 62 is reserved for stored person kinds (columns on `persons` for each person's kind, name order, message count, task count and newest contact, filled lazily and cleared by triggers when anything that decides them changes, so `people list` filters, sorts, pages and counts in SQL; columns, a partial index and triggers added only, forward-only, `minCompatible` stays 56; Desktop page speed plan item 1, 2026-11-10). Version 61 is reserved for people's ties to the owner (a phone-book marker written by `contacts sync`, indexes the tie checks need, and a stored ties table only if the benchmark in cli-testing `performance/people/ties` says reading them is too slow; columns and indexes added only, forward-only, `minCompatible` stays 56; people-clients-digests plan CC-2, 2026-11-09). Version 60 is reserved for WireCat base stages (`pipeline_stages.base_stage_id`, the stage of the owner's base set of its kind another pipeline's stage maps to, and `base_confirmed`, whether the owner confirmed that mapping or it is still a suggestion; columns added only, no table rebuild; forward-only, `minCompatible` stays 56; TASK-947, #2720, 2026-11-08). Version 59 is reserved for owner-edited message templates (`templates`: one row per key, such as `report/morning-digest`, channel, `telegram`, `email` or `text`, and language, the body the owner saved over the shipped default, when and by whom; `templates_history`, every body a save or a reset replaced, so an edit can be undone; forward-only, `minCompatible` stays 56; digest format plan §9 in max-cli, PR 5b, 2026-11-08). Version 58 is reserved for write-time enrichment (`enrichments`: per note, document or email, the standalone facts and reworded questions a hosted model wrote about it, with the hash of the text it read, the provider, the model and the tokens; triggers drop a record's row when the record is deleted; off by default, turned on by the owner with a consent; forward-only, `minCompatible` stays 56; feat/enrichment-setting, 2026-11-08). Version 57 is reserved for business entities (`catalog_items`, `order_lines`, `contracts`, `subscriptions` and `subscription_prices`, `financial_accounts`, `financial_transactions`, `transaction_splits`; `payments.refund_of` with net paid; contract, subscription, product and deal columns on invoices, payments, orders and their lines; `record_relations.as_role`, `records.created_entity`; forward-only, `minCompatible` as version 56 leaves it; business entities plan, `docs/dev/business-entities-plan.md`, #2649). Version 56 is reserved for business relationship links (`links.account_id`, the source account that reported a relationship; `links.starts_at` and `ends_at`, when it held, never guessed; `links.deleted_at`, the source stopped reporting it; `link_revisions`, one row per change of a relationship link written by triggers; a unique key on relationship links with the role and the account in it, after folding duplicates; CRM links stored so far become unconfirmed and name their account; forward-only; it raises `minCompatible` to 56, since an older build writing CRM links would bring back confirmed rows with no account (NEED-2406 A, pending); CRM relationships plan in cli-private `plans/2026-11-07-crm-relations/`, owner's ruling NEED-2372 A, 2026-11-07). Version 55 is taken by `decision_requests` (the one-time keys behind the buttons of a message that asks the owner to decide a batch from Telegram: only a token's digest is kept, using one cancels its siblings; forward-only, `minCompatible` stays 34; mail review from Telegram, plan §12 step 3 in max-cli, 2026-11-07). Version 54 is taken by CRM field definitions (`crm_fields`: a CRM account's own fields per kind, `deal`, `lead`, `person` or `organization`, with their code, label, type, whether they hold several values, whether a list can filter by them and a list field's options, written by the CRM sync and read by `fields list` and the desktop; values stay in each row's `metadata` keyed by code; forward-only, `minCompatible` stays 34; b24 plan §4.4, 2026-11-06). Version 53 is taken by CRM pipelines keyed by kind (the unique index on `pipelines` becomes `(account_id, kind, external_id)`, so a deal pipeline and a lead pipeline of one CRM account may share an id, and `pipelines.deleted_at` and `pipeline_stages.deleted_at` mark what the CRM deleted, kept because deals may still stand in it; forward-only, `minCompatible` stays 34; CRM write port, 2026-11-06). Version 52 is taken by deals and leads, amended in place on 2026-11-06 since no published CLI used 0.585.0, 0.586.0 or 0.587.0 (`pipelines` with a ref, a kind and an optional CRM account, `pipeline_stages` with an outcome, `deals`, `leads`, `pipeline_stage_changes` written by triggers, and a seeded `Leads` pipeline; agents write directly, no review; slice B2 of the business data plan). It keeps `minCompatible` at 34. Version 51 is taken by task links (`tasks.provider` and `tasks.external_id`, the task's id in an outside service such as an Avito conversation or listing, kept apart per service and given as `:`; `tasks.source_url` and `orders.source_url`, the http or https page the task or order is about, such as an Avito ad or an Amazon order; owner's ruling NEED-2245 A, 2026-11-05). It keeps `minCompatible` at 34. Version 50 is taken by orders (`orders`: what the owner or a client bought or sold, for whom (`customer_*`, a `person:` or `organization:`) and whether it is `personal`, `business`, `client` or `other`, the shop as the mail names it plus an optional `supplier_*` reference, the shop's order number, amount and currency in minor units, status `placed` | `shipped` | `delivered` | `cancelled` | `returned`, optional links to an invoice and a payment, and the audit and `review` columns invoices have; the mail-triage agent proposes them as `order` and `order_update` mail findings; BUG-531, owner's ruling NEED-2241 A, 2026-11-05). It keeps `minCompatible` at 34. Version 49 is taken by amounts on record relations (`record_relations.amount`, the share of a payment a `settles` relation of the records envelope names, as a decimal in the payment's currency, so an import allocates a payment split across invoices as its source says; WireCat records import, 2026-11-05). It keeps `minCompatible` at 34. Version 48 is taken by removing leaked test accounts (every account of provider `chat`, the fake messenger of `src/testing/shared-program.ts`, that tests wrote into the owner's real store before #2438; the migration sets a flag only in a store that holds one, and the next writable open purges each such account through `purgeAccount`; owner's choice NEED-250 A in the desktop journal, 2026-11-02). It keeps `minCompatible` at 34. Version 47 is taken by source records (`records`, `record_relations`: what each import said, unique per account, type and external id, with a fingerprint and the source's revision, mapped to at most one entity and never by name; relations to a record not yet imported wait for it; TASK-886 slice B1b, 2026-11-02). It keeps `minCompatible` at 34. Version 46 is taken by retiring payment facts (triggers `facts_no_payment_bi` and `facts_no_payment_bu` refuse a `payment` fact, and the next writable open moves stored payment facts into `payments` and `invoices` rows: a paid one a payment, an expected one an invoice, accepted ones confirmed and proposed ones proposed; owner's ruling NEED-2167 A, TASK-886 slice B0, 2026-11-02). It keeps `minCompatible` at 34. Version 45 is taken by finance tables (`invoices`, `invoice_lines`, `payments`, `payment_allocations`: money as integer minor units per ISO 4217 currency, invoice status derived from confirmed allocations, an agent's or an import's entry a proposal only the owner decides; triggers keep allocations within the payment, within the invoice and in one currency; TASK-886 slice B1a, 2026-11-02). It keeps `minCompatible` at 34. Version 44 is taken by proposals in one place (`relationships.purpose`, a chat's purpose in a project from the purposes memo's config lists, no fixed set in the store, null meaning `work`, beside the free-text `role`; unconfirmed links an agent or a rule proposed move from `links` into `proposed_actions` as `relationship` and `key_document` proposals with their bot, reason and time, while Drive editor links stay; TASK-834.d slice D2, 2026-11-02). It keeps `minCompatible` at 34. Version 43 is reserved for `memories.project_id` (a memory may name the project it belongs to, as a fact does, so the WireCat Desktop Memory page can group and filter memories by project; owner's choice NEED-198 A in the desktop journal, 2026-11-01). It keeps `minCompatible` at 34. Version 42 is reserved for narrowing the task revision (`tasks.revision` goes up only for a change a person could conflict with: title, description, status, priority, agent, due date, project and parent, and by triggers on `task_assignments` and task `taggings`; never for a claim, a follow-up time or a close suggestion; WireCat Desktop Tasks page, RISK-77, 2026-11-01). It keeps `minCompatible` at 34. Version 41 is taken by project task fields (`tasks.priority_score`, a decimal priority in [0, 1] that also orders a board column, kept in step with the old 0–4 `priority` by triggers; `tasks.agent`; `tasks.revision`, for a stale-write check; WireCat Desktop Tasks page, owner's choices NEED-176, NEED-178, NEED-180, 2026-11-01). It keeps `minCompatible` at 34. Version 40 is reserved for the trigram indexes of notes and documents (`note_trigrams`, `document_trigrams`: contentless FTS5 trigram tables over the normalized title and text, so notes, documents, knowledge annotations and contacts `--notes` are found by any part of a word in any letter case; owner's ruling A2, 2026-10-30). Version 39 is taken by `email_locations` (each stored email's place in an IMAP folder: folder, UIDVALIDITY and UID, so a quick mail sync proves deletions and refreshes flags for mail it does not read again; owner's choice NEED-1905 B in the private journal, 2026-10-30). Version 38 is reserved for folded copies of every remaining name a filter or lookup compares (project names and keys, tags, organizations, people and chat titles and the other text filters SQLite's ASCII-only `lower()` misses), with indexes on them, so every search ignores case in any script (owner's ruling, 2026-10-29). Version 37 is reserved for `identities.phone` (a person's phone as the messenger showed it, saved by `contacts sync` and by an online profile read, so `contacts show --offline` has it) and for the queue triggers that put a shared contact card's phone into `mentions` (tg-cli phones in the store, 2026-10-29). Version 36 is reserved for `attachments.contact` (a shared contact card's name, first and last name, whole phone and account id as JSON, so a card read from the store is the card the messenger sent; tg-cli contact cards, 2026-10-29). Version 35 is reserved for neutral calendar storage (`calendar_entries.series_external_id`, the provider's series id moved out of `metadata`, and RFC 5545-based words in the calendar columns; gcal plan lane C2, 2026-10-27). Version 34 is reserved for the vector index (`vector_indexes`, `vector_index_redo` and the triggers that keep one sqlite-vec `vec0` table per embedding model in step with `chunks` and `embeddings`; it raises `minCompatible` to 34, since a build without the extension can no longer write chunks; owner's choice 2026-10-25, stacked on #1979). Version 33 is reserved for calendar tables (`calendars`, `calendar_entries`, `calendar_entry_revisions`, `calendar_entry_participants`, `event_index_pending` and the events words index; `events.status`, `all_day`, `source_deleted_at`; `join_key` on `meetings` and `calendar_entries`; Wave 3 requirements 3.4). Version 32 is reserved for `files` (documents' source records, path plus parent), folder accounts' provider `folder` becoming `local` or `obsidian`, `entity_link_events`, the link review list and `identities.email`, with a backfill of one `files` row per `documents` row (Wave 3 requirements 3.3, 3.5, 3.6). Both ship in the same breaking release as versions 30 and 31 (owner's choice NEED-1780 A in the private journal, 2026-10-25). Version 31 is reserved for moving Drive documents from their stand-in notes-folder account (`folder`, `google-drive:`) to the `google-drive` account, so Drive is a provider of its own rather than a folder (owner's choice NEED-1727 A in the private journal, 2026-10-24). It ships only in the same release as version 30 (#1577) and raises `minCompatible` with it, so older CLIs refuse the store once, for both changes; it never ships on its own. Version 30 is reserved for reviewed tag redirects and text-free consolidation receipts, including a structural tag/automatic-claim compatibility boundary (Codex meetings/tag work, 2026-10-18; draft #1577, moved from 25 by the owner's choice NEED-1559, 2026-10-19, from 26 on 2026-10-21, from 27, 28 and 29 on 2026-10-22 because versions may not leave a gap and #1577 waits on a breaking release). Version 29 is taken by the voice-note transcript index (`transcript_words`, `transcript_words_vocab`, `transcript_stems` and its queue: a transcript found in any form of a word and widened to the spellings speech recognition garbles, as meetings are; owner's choice NEED-1635 B in the private journal, 2026-10-22). Version 28 is taken by chat state (`chats.muted`, `muted_until`, `archived`, `marked_unread` and `unread_counted_at`: a chat muted, archived or marked unread on the phone, and the point a messenger's unread count was taken, from which the store counts new messages for a messenger that opts in; wa, 2026-10-22). Version 27 is taken by `messages.delivery` (whether the owner's own message in a one-to-one chat was delivered or read, from the messenger's receipts; it only moves forward; wa, 2026-10-22). Version 26 is taken by `message_reactions` (each person's newest reaction to a message, from a messenger that sends reactions one person at a time; the store derives `messages.reactions` totals from them; wa, 2026-10-21). Its implementation and activation remain gated on a coordinated breaking release and consumer rollout; this reservation does not authorize raising `minCompatible` or publishing a new package major. Version 25 is taken by `chat_revisions` (one row per change to a chat's external id, title, membership, scope, search visibility or parent, written by a trigger in the same transaction; an offline read by a re-keyed chat's old id follows it; #1658, owner's choices NEED-1555 and NEED-1559, 2026-10-19). Version 24 is taken by `messages.starred` (the owner's star on a stored message, set by `messages star`/`unstar` and by the messenger's pushed star changes, read by `messages list starred:true` and `search messages is:starred`; wa S3 for S1, 2026-10-18). Version 23 is taken by `chat_events` and `chat_event_people` (who joined, left, was added, removed, promoted or demoted in a chat, and title changes, kept for a messenger whose history is pushed to the store; wa S3 for S2, 2026-10-18). Version 22 is taken by `account_identities.mail_demoted` (memo marks a sender whose fraud signals rank its mail lower in search; owner's choice NEED-1432, 2026-10-17). Version 21 is taken by resumable provider-neutral document annotation transfer receipts and reference mappings (Drive transfer, 2026-10-17). Version 20 is taken by `poll_votes` (each voter's newest vote in a poll the store holds, applied from the messenger's vote events and the owner's own votes; wa gaps, 2026-10-17). Version 19 is taken by the mail sender score (`account_identities.mail_score`, `mail_signals`, `mail_scored_at`: memo's spam score per sender and account, shown on email hits; owner's choice NEED-1403, 2026-10-17). Version 18 is taken by `places` (addresses found in text as records of their own, linked from `place` mentions; mentions plan phase 3, 2026-10-16). Version 17 is taken by the agent's close of a task (`tasks.close_certainty` and the close a task waits on the owner for — `close_suggested_as`, `_by`, `_certainty`, `_reason`, `_at`; tasks plan, follow-up-of and agent close, 2026-10-16). Version 16 is taken by mentions in documents, notes and mail (triggers that queue `documents.body`, `notes.body` and `emails` subject and text for mentions, as messages and attachments are; mentions plan phase 1e, 2026-10-15). Version 15 is taken by `task_pairs` (pairs of tasks that may be one job and every decision on them — review, unsure, merged, rejected, attach, new — with the levels the score came from; tasks plan step 5, 2026-10-15). Version 14 is taken by `task_words` / `task_stems` (full-text tables +**The next free migration version is 77.** Version 76 is reserved for mail types (`emails.mail_type`, `emails.reach` and `emails.type_signal`: each email's own type, such as order, newsletter or personal, how it reached the owner and the signal that decided it, worked out lazily from the stored headers, recipients, attachment types, the sender's bot and organization sector and the owner's own mail, and nulled by triggers on those inputs; a partial index over the emails still to work out and an index for filtering by type; columns, indexes and triggers added only, forward-only, `minCompatible` stays 73; contact-kinds plan, "Mail categories", owner's rulings 2026-11-25). Version 75 is taken by bots as their own entity (`sender_bot_identities`: the identities a sender bot holds, an identity there or in `identity_links`, never both; the upgrade moves each version 74 bot's identities off its person row, logs the move in `sender_bot_moves` with the index `sender_bot_moves_by_from_person_id`, keeps that row with kind `merged`, hidden as a merge's emptied person is, and sets `sender_bots.person_id` negative so a build before 75 reads no bot as a person; triggers keep such a build apart: no link to a person for a bot's identity (`RAISE(IGNORE)`), the person its ingest made for one goes again, a re-keyed link onto one moves to the bot, a bot holding identities is not deleted, a hidden person's kind stays `merged`, and a bot goes with its last identity; a table, indexes and triggers added, rows moved, forward-only, `minCompatible` stays 73, checked against cli-core 1.0.0 itself; contact-kinds plan step 3 in its full form, owner's ruling, 2026-11-25, reserved in #3355, announced on issue #3157). Version 74 is reserved for sender bots (`sender_bots`: a program that writes to the owner, kept apart from people, with the person row it was sorted from, an optional organization, `rules` or `owner` as author; `sender_bot_moves`, every move of an identity between a person and a bot with who and why; triggers that drop their rows with a person, an identity or an organization, since neither table has a foreign key, and clear the person's stored kind; the index `emails_by_list_id` over the List-Id the people list reads; tables, an index and triggers added only, forward-only, `minCompatible` unchanged; contact-kinds plan steps 3 and 4, cli-core#3314, owner's ruling NEED-109 A; it merges after version 73, reserved in the same pull request as version 72 was, announced on issue #3157). Version 73 is taken by cli-core 1.0's store (every base table with an integer `id`, 101 of them, copied once to become `AUTOINCREMENT`, each counter started 1,000 above the largest id the store still knows; `CHECK`s for valid JSON in JSON columns, whole-or-empty pointer pairs and non-negative amounts; the index `taggings_by_taggable_type_taggable_id`; the runner turns foreign keys off before `BEGIN` for a migration that copies tables, puts back their triggers and indexes and checks their foreign keys before `COMMIT`; it raises `minCompatible` to 73 and refuses to run without a rollback copy unless `store migrate --no-backup`; owner's ruling NEED-2872 A, cli-core 1.0 plan phase 4, 2026-11-23). Version 72 is taken by document history (`document_revisions.title`, `front_matter` and `reason`, so a version keeps what the document was and why it was replaced: edited, deleted, unavailable or unsynced. `documents.removal`, why a removed document left the copy, its text kept when unavailable. `document_changes`, the change log of synced documents with no foreign key, and the trigger `document_changes_account_bd` that drops an account's rows with it. Columns, a table, an index and a trigger added only, forward-only, `minCompatible` stays 56. IDEA-2862 in cli-private's Notion roadmap, owner's answers NEED-2802, NEED-2803 A and NEED-2805, 2026-11-23. Reserved in the same pull request, as version 67 was, announced on issue #3157). Version 71 is reserved for the content category (`content_channels`, `content_authors`, `content_terms`, `content_posts` with the body as Markdown and its hash and its terms, authors and media as JSON (no `content_post_terms`: a post is found by a term through its JSON and its taggings), `content_post_revisions` (the title, body and status a sync or a write replaced, and a post the source deleted, kept before the change), `content_metrics` (snapshots in time, never overwritten) and the contentless word index `content_post_words` kept by triggers; a post becomes a taggable type `post`, with a trigger that drops its taggings when the post row goes; blog posts and pages of a site such as WordPress, later social posts; tables, indexes and triggers added only, forward-only, `minCompatible` stays 56; content category plan C5 in cli-private, owner's ruling NEED-2722 A, 2026-11-18). Version 70 is reserved for the tracker category (`tracker_items`: one row per team, user, workflow state, label, project, issue or comment of an issue tracker account such as Linear, with its source id, parent, title, text, source times, archive and deletion marks and the rest as JSON; `tracker_item_words`, a contentless word index over titles and text kept by triggers; tables, indexes and triggers added only, forward-only, `minCompatible` stays 56; owner's ruling NEED-2717 A, source-manifest plan L3 in cli-private, 2026-11-17). Version 69 is reserved for stored conversation readiness (`conversation_readiness`: per built chat and embedding model, the counts `search conversations` reports — messages new, edited or deleted since the build, chunks with current, stale and missing vectors — saved when first counted and dropped by triggers when the chat's messages, revisions, build or that model's vectors change, so a search reads them instead of recounting every chat; table and triggers added only, forward-only, `minCompatible` stays 56; owner's ruling NEED-63 A, 2026-11-17). Version 68 is taken by CRM client files (`crm_files`: one row per downloaded file of a deal, lead, contact or company, with its owner record, source kind, name, size, type, local path and extracted text in its own word index, never a download link; CRM files plan in cli-private, 2026-11-16). Version 67 is taken by the facts removal log and phone-call fields on meetings (`fact_removals`: one row per removed fact with its id, the reference of what it was about, who removed it, when and why, never its text or value; `meetings.direction` and `client_phone`, set by a phone-line source; table, columns and indexes added only, forward-only, `minCompatible` stays 56; owner's rulings NEED-2614 B and the call-fields decision A, 2026-11-13; reserved in the same pull request under the one-PR rule for that round, announced on issue #849). Version 66 is reserved for the person-kind trigger on account names (`person_kind_identity_au` recreated to watch `identities.name` too, so a person with no name of their own has their kind and name order worked out again when an account's name changes; triggers only, forward-only, `minCompatible` stays 56; RISK-2268, 2026-11-11). Version 65 is taken by titles of found tasks (the migration sets a `store_settings` key only in a store holding a task still titled ` — `, and the next writable open gives each such task the first line of its source message, as `tasks list` already shows it, in batches, then deletes the key; tasks whose message is missing, deleted or empty keep their title; no schema change, forward-only, `minCompatible` stays 56; owner's ruling NEED-2517 B, 2026-11-10). Version 64 is taken by faster person-kind triggers on deal links (`person_kind_deal_link_ai`, `_ad` and `_au` recreated so their lookup of a deal's other links uses the `(from_type, from_id)` index, and `person_kind_deal_owner_moved_au` and `_owner_person_au` so they find the owner's links by person; version 63's read every person link per row, about 24 ms each on 118k links; triggers only, forward-only, `minCompatible` stays 56; removing CRM contacts outside the scope, owner's ruling 2026-11-10). Version 63 is reserved for people's ties from messages and CRM deals (triggers that clear a stored person kind when a deal or lead names the person or changes its owner, and when a chat whose message senders count as ties changes kind or crosses the small-group size; triggers only, forward-only, `minCompatible` stays 56; BUG-676 and the owner's ruling NEED-2500 A, 2026-11-10). Version 62 is reserved for stored person kinds (columns on `persons` for each person's kind, name order, message count, task count and newest contact, filled lazily and cleared by triggers when anything that decides them changes, so `people list` filters, sorts, pages and counts in SQL; columns, a partial index and triggers added only, forward-only, `minCompatible` stays 56; Desktop page speed plan item 1, 2026-11-10). Version 61 is reserved for people's ties to the owner (a phone-book marker written by `contacts sync`, indexes the tie checks need, and a stored ties table only if the benchmark in cli-testing `performance/people/ties` says reading them is too slow; columns and indexes added only, forward-only, `minCompatible` stays 56; people-clients-digests plan CC-2, 2026-11-09). Version 60 is reserved for WireCat base stages (`pipeline_stages.base_stage_id`, the stage of the owner's base set of its kind another pipeline's stage maps to, and `base_confirmed`, whether the owner confirmed that mapping or it is still a suggestion; columns added only, no table rebuild; forward-only, `minCompatible` stays 56; TASK-947, #2720, 2026-11-08). Version 59 is reserved for owner-edited message templates (`templates`: one row per key, such as `report/morning-digest`, channel, `telegram`, `email` or `text`, and language, the body the owner saved over the shipped default, when and by whom; `templates_history`, every body a save or a reset replaced, so an edit can be undone; forward-only, `minCompatible` stays 56; digest format plan §9 in max-cli, PR 5b, 2026-11-08). Version 58 is reserved for write-time enrichment (`enrichments`: per note, document or email, the standalone facts and reworded questions a hosted model wrote about it, with the hash of the text it read, the provider, the model and the tokens; triggers drop a record's row when the record is deleted; off by default, turned on by the owner with a consent; forward-only, `minCompatible` stays 56; feat/enrichment-setting, 2026-11-08). Version 57 is reserved for business entities (`catalog_items`, `order_lines`, `contracts`, `subscriptions` and `subscription_prices`, `financial_accounts`, `financial_transactions`, `transaction_splits`; `payments.refund_of` with net paid; contract, subscription, product and deal columns on invoices, payments, orders and their lines; `record_relations.as_role`, `records.created_entity`; forward-only, `minCompatible` as version 56 leaves it; business entities plan, `docs/dev/business-entities-plan.md`, #2649). Version 56 is reserved for business relationship links (`links.account_id`, the source account that reported a relationship; `links.starts_at` and `ends_at`, when it held, never guessed; `links.deleted_at`, the source stopped reporting it; `link_revisions`, one row per change of a relationship link written by triggers; a unique key on relationship links with the role and the account in it, after folding duplicates; CRM links stored so far become unconfirmed and name their account; forward-only; it raises `minCompatible` to 56, since an older build writing CRM links would bring back confirmed rows with no account (NEED-2406 A, pending); CRM relationships plan in cli-private `plans/2026-11-07-crm-relations/`, owner's ruling NEED-2372 A, 2026-11-07). Version 55 is taken by `decision_requests` (the one-time keys behind the buttons of a message that asks the owner to decide a batch from Telegram: only a token's digest is kept, using one cancels its siblings; forward-only, `minCompatible` stays 34; mail review from Telegram, plan §12 step 3 in max-cli, 2026-11-07). Version 54 is taken by CRM field definitions (`crm_fields`: a CRM account's own fields per kind, `deal`, `lead`, `person` or `organization`, with their code, label, type, whether they hold several values, whether a list can filter by them and a list field's options, written by the CRM sync and read by `fields list` and the desktop; values stay in each row's `metadata` keyed by code; forward-only, `minCompatible` stays 34; b24 plan §4.4, 2026-11-06). Version 53 is taken by CRM pipelines keyed by kind (the unique index on `pipelines` becomes `(account_id, kind, external_id)`, so a deal pipeline and a lead pipeline of one CRM account may share an id, and `pipelines.deleted_at` and `pipeline_stages.deleted_at` mark what the CRM deleted, kept because deals may still stand in it; forward-only, `minCompatible` stays 34; CRM write port, 2026-11-06). Version 52 is taken by deals and leads, amended in place on 2026-11-06 since no published CLI used 0.585.0, 0.586.0 or 0.587.0 (`pipelines` with a ref, a kind and an optional CRM account, `pipeline_stages` with an outcome, `deals`, `leads`, `pipeline_stage_changes` written by triggers, and a seeded `Leads` pipeline; agents write directly, no review; slice B2 of the business data plan). It keeps `minCompatible` at 34. Version 51 is taken by task links (`tasks.provider` and `tasks.external_id`, the task's id in an outside service such as an Avito conversation or listing, kept apart per service and given as `:`; `tasks.source_url` and `orders.source_url`, the http or https page the task or order is about, such as an Avito ad or an Amazon order; owner's ruling NEED-2245 A, 2026-11-05). It keeps `minCompatible` at 34. Version 50 is taken by orders (`orders`: what the owner or a client bought or sold, for whom (`customer_*`, a `person:` or `organization:`) and whether it is `personal`, `business`, `client` or `other`, the shop as the mail names it plus an optional `supplier_*` reference, the shop's order number, amount and currency in minor units, status `placed` | `shipped` | `delivered` | `cancelled` | `returned`, optional links to an invoice and a payment, and the audit and `review` columns invoices have; the mail-triage agent proposes them as `order` and `order_update` mail findings; BUG-531, owner's ruling NEED-2241 A, 2026-11-05). It keeps `minCompatible` at 34. Version 49 is taken by amounts on record relations (`record_relations.amount`, the share of a payment a `settles` relation of the records envelope names, as a decimal in the payment's currency, so an import allocates a payment split across invoices as its source says; WireCat records import, 2026-11-05). It keeps `minCompatible` at 34. Version 48 is taken by removing leaked test accounts (every account of provider `chat`, the fake messenger of `src/testing/shared-program.ts`, that tests wrote into the owner's real store before #2438; the migration sets a flag only in a store that holds one, and the next writable open purges each such account through `purgeAccount`; owner's choice NEED-250 A in the desktop journal, 2026-11-02). It keeps `minCompatible` at 34. Version 47 is taken by source records (`records`, `record_relations`: what each import said, unique per account, type and external id, with a fingerprint and the source's revision, mapped to at most one entity and never by name; relations to a record not yet imported wait for it; TASK-886 slice B1b, 2026-11-02). It keeps `minCompatible` at 34. Version 46 is taken by retiring payment facts (triggers `facts_no_payment_bi` and `facts_no_payment_bu` refuse a `payment` fact, and the next writable open moves stored payment facts into `payments` and `invoices` rows: a paid one a payment, an expected one an invoice, accepted ones confirmed and proposed ones proposed; owner's ruling NEED-2167 A, TASK-886 slice B0, 2026-11-02). It keeps `minCompatible` at 34. Version 45 is taken by finance tables (`invoices`, `invoice_lines`, `payments`, `payment_allocations`: money as integer minor units per ISO 4217 currency, invoice status derived from confirmed allocations, an agent's or an import's entry a proposal only the owner decides; triggers keep allocations within the payment, within the invoice and in one currency; TASK-886 slice B1a, 2026-11-02). It keeps `minCompatible` at 34. Version 44 is taken by proposals in one place (`relationships.purpose`, a chat's purpose in a project from the purposes memo's config lists, no fixed set in the store, null meaning `work`, beside the free-text `role`; unconfirmed links an agent or a rule proposed move from `links` into `proposed_actions` as `relationship` and `key_document` proposals with their bot, reason and time, while Drive editor links stay; TASK-834.d slice D2, 2026-11-02). It keeps `minCompatible` at 34. Version 43 is reserved for `memories.project_id` (a memory may name the project it belongs to, as a fact does, so the WireCat Desktop Memory page can group and filter memories by project; owner's choice NEED-198 A in the desktop journal, 2026-11-01). It keeps `minCompatible` at 34. Version 42 is reserved for narrowing the task revision (`tasks.revision` goes up only for a change a person could conflict with: title, description, status, priority, agent, due date, project and parent, and by triggers on `task_assignments` and task `taggings`; never for a claim, a follow-up time or a close suggestion; WireCat Desktop Tasks page, RISK-77, 2026-11-01). It keeps `minCompatible` at 34. Version 41 is taken by project task fields (`tasks.priority_score`, a decimal priority in [0, 1] that also orders a board column, kept in step with the old 0–4 `priority` by triggers; `tasks.agent`; `tasks.revision`, for a stale-write check; WireCat Desktop Tasks page, owner's choices NEED-176, NEED-178, NEED-180, 2026-11-01). It keeps `minCompatible` at 34. Version 40 is reserved for the trigram indexes of notes and documents (`note_trigrams`, `document_trigrams`: contentless FTS5 trigram tables over the normalized title and text, so notes, documents, knowledge annotations and contacts `--notes` are found by any part of a word in any letter case; owner's ruling A2, 2026-10-30). Version 39 is taken by `email_locations` (each stored email's place in an IMAP folder: folder, UIDVALIDITY and UID, so a quick mail sync proves deletions and refreshes flags for mail it does not read again; owner's choice NEED-1905 B in the private journal, 2026-10-30). Version 38 is reserved for folded copies of every remaining name a filter or lookup compares (project names and keys, tags, organizations, people and chat titles and the other text filters SQLite's ASCII-only `lower()` misses), with indexes on them, so every search ignores case in any script (owner's ruling, 2026-10-29). Version 37 is reserved for `identities.phone` (a person's phone as the messenger showed it, saved by `contacts sync` and by an online profile read, so `contacts show --offline` has it) and for the queue triggers that put a shared contact card's phone into `mentions` (tg-cli phones in the store, 2026-10-29). Version 36 is reserved for `attachments.contact` (a shared contact card's name, first and last name, whole phone and account id as JSON, so a card read from the store is the card the messenger sent; tg-cli contact cards, 2026-10-29). Version 35 is reserved for neutral calendar storage (`calendar_entries.series_external_id`, the provider's series id moved out of `metadata`, and RFC 5545-based words in the calendar columns; gcal plan lane C2, 2026-10-27). Version 34 is reserved for the vector index (`vector_indexes`, `vector_index_redo` and the triggers that keep one sqlite-vec `vec0` table per embedding model in step with `chunks` and `embeddings`; it raises `minCompatible` to 34, since a build without the extension can no longer write chunks; owner's choice 2026-10-25, stacked on #1979). Version 33 is reserved for calendar tables (`calendars`, `calendar_entries`, `calendar_entry_revisions`, `calendar_entry_participants`, `event_index_pending` and the events words index; `events.status`, `all_day`, `source_deleted_at`; `join_key` on `meetings` and `calendar_entries`; Wave 3 requirements 3.4). Version 32 is reserved for `files` (documents' source records, path plus parent), folder accounts' provider `folder` becoming `local` or `obsidian`, `entity_link_events`, the link review list and `identities.email`, with a backfill of one `files` row per `documents` row (Wave 3 requirements 3.3, 3.5, 3.6). Both ship in the same breaking release as versions 30 and 31 (owner's choice NEED-1780 A in the private journal, 2026-10-25). Version 31 is reserved for moving Drive documents from their stand-in notes-folder account (`folder`, `google-drive:`) to the `google-drive` account, so Drive is a provider of its own rather than a folder (owner's choice NEED-1727 A in the private journal, 2026-10-24). It ships only in the same release as version 30 (#1577) and raises `minCompatible` with it, so older CLIs refuse the store once, for both changes; it never ships on its own. Version 30 is reserved for reviewed tag redirects and text-free consolidation receipts, including a structural tag/automatic-claim compatibility boundary (Codex meetings/tag work, 2026-10-18; draft #1577, moved from 25 by the owner's choice NEED-1559, 2026-10-19, from 26 on 2026-10-21, from 27, 28 and 29 on 2026-10-22 because versions may not leave a gap and #1577 waits on a breaking release). Version 29 is taken by the voice-note transcript index (`transcript_words`, `transcript_words_vocab`, `transcript_stems` and its queue: a transcript found in any form of a word and widened to the spellings speech recognition garbles, as meetings are; owner's choice NEED-1635 B in the private journal, 2026-10-22). Version 28 is taken by chat state (`chats.muted`, `muted_until`, `archived`, `marked_unread` and `unread_counted_at`: a chat muted, archived or marked unread on the phone, and the point a messenger's unread count was taken, from which the store counts new messages for a messenger that opts in; wa, 2026-10-22). Version 27 is taken by `messages.delivery` (whether the owner's own message in a one-to-one chat was delivered or read, from the messenger's receipts; it only moves forward; wa, 2026-10-22). Version 26 is taken by `message_reactions` (each person's newest reaction to a message, from a messenger that sends reactions one person at a time; the store derives `messages.reactions` totals from them; wa, 2026-10-21). Its implementation and activation remain gated on a coordinated breaking release and consumer rollout; this reservation does not authorize raising `minCompatible` or publishing a new package major. Version 25 is taken by `chat_revisions` (one row per change to a chat's external id, title, membership, scope, search visibility or parent, written by a trigger in the same transaction; an offline read by a re-keyed chat's old id follows it; #1658, owner's choices NEED-1555 and NEED-1559, 2026-10-19). Version 24 is taken by `messages.starred` (the owner's star on a stored message, set by `messages star`/`unstar` and by the messenger's pushed star changes, read by `messages list starred:true` and `search messages is:starred`; wa S3 for S1, 2026-10-18). Version 23 is taken by `chat_events` and `chat_event_people` (who joined, left, was added, removed, promoted or demoted in a chat, and title changes, kept for a messenger whose history is pushed to the store; wa S3 for S2, 2026-10-18). Version 22 is taken by `account_identities.mail_demoted` (memo marks a sender whose fraud signals rank its mail lower in search; owner's choice NEED-1432, 2026-10-17). Version 21 is taken by resumable provider-neutral document annotation transfer receipts and reference mappings (Drive transfer, 2026-10-17). Version 20 is taken by `poll_votes` (each voter's newest vote in a poll the store holds, applied from the messenger's vote events and the owner's own votes; wa gaps, 2026-10-17). Version 19 is taken by the mail sender score (`account_identities.mail_score`, `mail_signals`, `mail_scored_at`: memo's spam score per sender and account, shown on email hits; owner's choice NEED-1403, 2026-10-17). Version 18 is taken by `places` (addresses found in text as records of their own, linked from `place` mentions; mentions plan phase 3, 2026-10-16). Version 17 is taken by the agent's close of a task (`tasks.close_certainty` and the close a task waits on the owner for — `close_suggested_as`, `_by`, `_certainty`, `_reason`, `_at`; tasks plan, follow-up-of and agent close, 2026-10-16). Version 16 is taken by mentions in documents, notes and mail (triggers that queue `documents.body`, `notes.body` and `emails` subject and text for mentions, as messages and attachments are; mentions plan phase 1e, 2026-10-15). Version 15 is taken by `task_pairs` (pairs of tasks that may be one job and every decision on them — review, unsure, merged, rejected, attach, new — with the levels the score came from; tasks plan step 5, 2026-10-15). Version 14 is taken by `task_words` / `task_stems` (full-text tables for tasks, kept by task writes, for the duplicate check's candidate lookup; tasks plan step 3, 2026-10-15). Version 13 is taken by task fields (`category`, `claimed_by`, `claimed_until`, per-type keys for message tasks, tasks as a taggable type; tasks plan step 2, 2026-10-14). Version 12 is taken by `mail_rules` (mail rules move from memo's config into the store, with the rule that decided each email; universal mail rules plan in cli-memo, 2026-10-14).