From ff0e2fbb787630e1a980d9d242b724e8ae816fe7 Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 25 Nov 2026 22:12:22 +0100 Subject: [PATCH 1/2] feat(mail): sorting rules by mail, list, address and domain (store version 77) One rules table over mail, applied in a fixed order before the header classifier of store version 76: one mail; a List-Id or a subject pattern; an address; a registrable domain (Public Suffix List). Within a scope the owner's rule beats the program's and the newest wins; a domain rule may beat the address rules (overAddresses). Addresses match whole and domains on a label boundary, so ann@ never matches joann@. A rule sets the mail type, moves the sender to a bot or a person through moveToBot and moveToPerson (for its whole history, owner only), or files the sender under an organization through holdAddress. Each correction names its scope and applyTo (all, or only mail dated from the rule on). An email a rule typed carries typeSignal rule:. Free-mail and throwaway domains (FREE_MAIL, the data pack's free-mail lists, the disposable list): a domain rule there is the owner's only and is set only with the confirm of a dry run whose counts still hold. No call widens a correction to a domain on its own; scopes() lists the domain last and flags free mail. store.mail.sorting (experimental): rules, scopes, add (dryRun, confirm), remove, undo (newest first, walks back) and reset (a sender's address and one-mail rules). Removing a rule types its mail again and puts its senders back from mail_sort_effects. Store version 77 (reserved in #3360): mail_sort_rules, mail_sort_effects, emails.sort_checked with a partial index and a trigger that nulls it with mail_type, so a type a build before 77 kept is worked out again once a rule exists. Added only, forward-only, minCompatible stays 73. Co-Authored-By: Claude Opus 5.5 --- biome.json | 6 +- changes/feat-mail-rules.md | 12 + docs/dev/COORDINATION.md | 2 +- docs/dev/GLOSSARY.md | 6 + docs/reasons.md | 16 + docs/storage/schema.md | 46 +- .../migration.sql | 34 + .../snapshot.json | 26999 ++++++++++++++++ .../migration.sql | 10 + .../snapshot.json | 26999 ++++++++++++++++ package.json | 2 +- scripts/schema/codegen/gen-schema.mjs | 1 + scripts/schema/mail-sorting.mjs | 58 + scripts/schema/spec.mjs | 6 + src/errors/reasons.ts | 25 + src/mail/headers.ts | 3 +- src/mail/sort-rules.test.ts | 81 + src/mail/sort-rules.ts | 133 + src/store/mail-sorting.test.ts | 332 + src/store/sqlite/email-types.ts | 62 +- src/store/sqlite/emails.ts | 11 +- src/store/sqlite/mail-sorting.ts | 710 + src/store/sqlite/manifest.ts | 2 + src/store/sqlite/migrations.generated.ts | 20 + src/store/sqlite/schema.ts | 4 + src/store/sqlite/schema/mail-sorting.ts | 41 + src/store/version-77.test.ts | 56 + src/testing/older-store.ts | 4 + 28 files changed, 55657 insertions(+), 24 deletions(-) create mode 100644 changes/feat-mail-rules.md create mode 100644 drizzle/20261125205013_version-77-mail-sort-rules/migration.sql create mode 100644 drizzle/20261125205013_version-77-mail-sort-rules/snapshot.json create mode 100644 drizzle/20261125205014_version-77-mail-sort-triggers/migration.sql create mode 100644 drizzle/20261125205014_version-77-mail-sort-triggers/snapshot.json create mode 100644 scripts/schema/mail-sorting.mjs create mode 100644 src/mail/sort-rules.test.ts create mode 100644 src/mail/sort-rules.ts create mode 100644 src/store/mail-sorting.test.ts create mode 100644 src/store/sqlite/mail-sorting.ts create mode 100644 src/store/sqlite/schema/mail-sorting.ts create mode 100644 src/store/version-77.test.ts diff --git a/biome.json b/biome.json index edfc847b1..ca106dce4 100644 --- a/biome.json +++ b/biome.json @@ -772,7 +772,7 @@ "noExcessiveLinesPerFile": { "level": "error", "options": { - "maxLines": 1902 + "maxLines": 1908 } } } @@ -792,7 +792,7 @@ "noExcessiveLinesPerFile": { "level": "error", "options": { - "maxLines": 1024 + "maxLines": 1033 } } } @@ -822,7 +822,7 @@ "noExcessiveLinesPerFile": { "level": "error", "options": { - "maxLines": 3265 + "maxLines": 3269 } } } diff --git a/changes/feat-mail-rules.md b/changes/feat-mail-rules.md new file mode 100644 index 000000000..5ff098590 --- /dev/null +++ b/changes/feat-mail-rules.md @@ -0,0 +1,12 @@ +### Added + +- **Mail sorting rules (store version 77).** `store.mail.sorting` keeps the owner's and the program's rules over mail: + `add` (with `dryRun`), `rules`, `remove`, `undo`, `reset` and `scopes`, all experimental. A rule names its scope, + one mail, a List-Id, a subject pattern, an address or a registrable domain, and says whether it sorts past mail too + (`applyTo: "all"`) or only mail dated from now on (`"new"`). The first scope that has a rule wins, in that order, then + the header classifier; within a scope the owner's rule beats the program's and the newest wins, and a domain rule may + beat the address rules (`overAddresses`). A rule sets the mail type, makes the sender a bot or a person through + `moveToBot` and `moveToPerson`, or files the sender under an organization. An email a rule typed has `typeSignal` + `rule:`. A domain rule on a free-mail or throwaway domain is the owner's only and is set only with the `confirm` + of a dry run that shows how many addresses and emails it touches. Removing or undoing a rule types its mail again and + moves its senders back. Not the storage `store.mail.rules`. diff --git a/docs/dev/COORDINATION.md b/docs/dev/COORDINATION.md index 5c39e20cb..f50a83d42 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 78.** Version 77 is reserved for mail sorting rules (`mail_sort_rules`: the owner's and the program's rules by one mail, a List-Id or a subject pattern, an address and a registrable domain, first match wins in that order, each setting a mail type, a sender's bot or person through `moveToBot` and `moveToPerson`, or an organization, applied to past mail or to new mail only, removed softly so a removal can be undone; a log of the sender moves a rule made, for undo; an `emails` column and triggers so a type worked out without the rules is worked out again; tables, columns, indexes and triggers added only, forward-only, `minCompatible` stays 73; contact-kinds plan, "Mail categories", owner's rulings 2026-11-25). Version 76 is taken by 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 +**The next free migration version is 78.** Version 77 is taken by mail sorting rules (`mail_sort_rules`: the owner's and the program's rules by one mail, a List-Id or a subject pattern, an address and a registrable domain, first match wins in that order, then the header classifier; each sets a mail type, a sender's bot or person through `moveToBot` and `moveToPerson`, or an organization, for past mail too or only mail dated from the rule on, removed softly with `removed_at` and `undone_at` so a removal or an add can be undone; `mail_sort_effects`: what a rule did to each sender identity, put back on removal, dropped with the identity by a trigger; `emails.sort_checked` with the partial index `emails_sort_to_check` and a trigger that nulls it with `mail_type`, so a type a build before 77 kept is worked out again once a rule exists; tables, a column, indexes and triggers added, forward-only, `minCompatible` stays 73; contact-kinds plan, "Mail categories", owner's rulings 2026-11-25, reserved in #3360). Version 76 is taken by 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). diff --git a/docs/dev/GLOSSARY.md b/docs/dev/GLOSSARY.md index c318e9658..69cc0cc29 100644 --- a/docs/dev/GLOSSARY.md +++ b/docs/dev/GLOSSARY.md @@ -78,6 +78,7 @@ Verbs used but not in cli-base's vocabulary, by CLI (2026-10-12). Each needs a r | 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 | | mail type | what one email is, apart from who sent it: one of the words in [Mail types](#mail-types), worked out per email from what the store keeps of it (`emails.mail_type`, key `mailType`). A sender's view is a summary of its mail, so a shop that sends receipts and sales counts under `order` and under `promotion` | category, kind (a person's `kind` is another thing), label | none | +| sorting rule | the owner's or the program's word on what mail is, by one of five scopes tried in this order: one mail, a List-Id or a subject pattern, an address, a registrable domain; then the header classifier. It sets a mail type, makes the sender a bot or a person for its whole history, or files the sender under an organization (`mail_sort_rules`, `store.mail.sorting`). An email it typed has `typeSignal` `rule:`. Not a mail rule: `mail_rules` decide how one account's sync stores mail | filter, mail rule, label rule | none | | reach | how a message reached the owner: `direct` (to the owner or a few people), `group` (a large group or a discussion list), `broadcast` (one sender to many readers who cannot answer in place). Worked out per email (`emails.reach`) and per sender (`people list`) | audience, scope | none | | 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 | @@ -126,6 +127,11 @@ email itself carries (a part, schema.org markup, list headers), never by an addr | `personal` | a person writing, to the owner or to a few people | primary, direct | | `other` | a program's mail no rule above names | unknown | +A sorting rule decides before these: the first scope that has a rule wins (one mail; a List-Id or a subject pattern; an +address; a domain), and within a scope the owner's rule beats the program's and the newest wins. A domain rule may say +it beats the address rules. Addresses match whole and domains on a label boundary: `ann@` never matches `joann@`. A +domain rule on a free-mail or throwaway domain (`gmail.com`) is the owner's only and is set only after a dry run. + ## Output keys Read from source, not run. diff --git a/docs/reasons.md b/docs/reasons.md index 943274b8c..a6d2fe0b9 100644 --- a/docs/reasons.md +++ b/docs/reasons.md @@ -269,6 +269,22 @@ headings. | `mail-findings.not-stored` | `not_found` | a mail finding cites an email the store does not hold | | | `mail-findings.partial` | `validation_error` | a cited email is not stored whole yet; cite it once it is | | | `mail-findings.stale` | `validation_error` | mail findings cite mail that changed since it was read; stage a new batch | | +| `mail-sort.apply-to` | `validation_error` | a sorting rule says whether it sorts past mail too: applyTo all or new | | +| `mail-sort.confirm` | `validation_error` | a free-mail domain rule needs the confirm of a dry run whose counts still hold; run the dry run again | | +| `mail-sort.email` | `not_found` | no incoming email has that id | | +| `mail-sort.free-mail-program` | `validation_error` | only the owner sets a sorting rule on a free-mail or throwaway domain | | +| `mail-sort.mail-type` | `validation_error` | the mail type is not one of the known types | | +| `mail-sort.no-action` | `validation_error` | a sorting rule sets a mail type, a sender or an organization | | +| `mail-sort.not-found` | `not_found` | no mail sorting rule has that id; the rules list names them | | +| `mail-sort.organization` | `validation_error` | the organization named is not in the store | | +| `mail-sort.over-addresses` | `validation_error` | only a domain rule can beat the address rules | | +| `mail-sort.owner-only` | `validation_error` | only the owner moves or files senders, undoes and resets; a program removes its own rules | | +| `mail-sort.scope` | `validation_error` | a sorting rule's scope is mail, list, subject, address or domain | | +| `mail-sort.sender` | `validation_error` | a sorting rule makes a sender a bot or a person | | +| `mail-sort.sender-new` | `validation_error` | a sender moves with its whole history, so an address rule that moves one applies to all | | +| `mail-sort.sender-ref` | `validation_error` | the sender is named by an address, a person: ref or a sender-bot: ref | | +| `mail-sort.sender-scope` | `validation_error` | a sorting rule moves or files a sender at address or domain scope only | | +| `mail-sort.value` | `validation_error` | the value names no mail, list, subject, address or domain of that scope | | | `mail.attachments-unread` | `provider_unavailable` | the email could not be read again, so its skipped attachments have no text | | | `mail.cursor-ahead` | `validation_error` | an acknowledge cursor is past the newest stored email | | | `mail.holder-not-yours` | `permission_error` | a run moves only the mark of the holder its schedule names | | diff --git a/docs/storage/schema.md b/docs/storage/schema.md index 1c8262072..66bf7b408 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. -148 tables, 28 full-text indexes. +150 tables, 28 full-text indexes. ## Conventions @@ -812,8 +812,9 @@ One email. | `mail_type` | text | | | what the email is (`order`, `newsletter`, `personal`, …, docs/dev/GLOSSARY.md); null until worked out, and nulled by triggers on its inputs | | `reach` | text | | | `direct`, `group` or `broadcast`: how it reached the owner; kept with `mail_type` | | `type_signal` | text | | | what decided `mail_type`, such as `list-id`; kept with it | +| `sort_checked` | integer | | | 1: `mail_type` was worked out with the sorting rules; a build before version 77 leaves it null | -*Keys and indexes:* `UNIQUE (account_id, external_id)`, `INDEX (account_id, sent_at DESC)`, `INDEX (mail_rule_id) WHERE mail_rule_id IS NOT NULL`, `INDEX (mail_type)`, `INDEX (id) WHERE mail_type IS NULL`, `INDEX (coalesce(json_extract(headers, '$."list-id"'), json_extract(metadata, '$.listId')))`, `INDEX (email_thread_id)`, `INDEX (from_identity_id)` +*Keys and indexes:* `UNIQUE (account_id, external_id)`, `INDEX (account_id, sent_at DESC)`, `INDEX (mail_rule_id) WHERE mail_rule_id IS NOT NULL`, `INDEX (mail_type)`, `INDEX (id) WHERE mail_type IS NULL`, `INDEX (id) WHERE mail_type IS NOT NULL AND sort_checked IS NULL`, `INDEX (coalesce(json_extract(headers, '$."list-id"'), json_extract(metadata, '$.listId')))`, `INDEX (email_thread_id)`, `INDEX (from_identity_id)` *Checks:* `CHECK ("references" IS NULL OR json_valid("references"))`, `CHECK ("headers" IS NULL OR json_valid("headers"))`, `CHECK ("metadata" IS NULL OR json_valid("metadata"))` @@ -838,6 +839,47 @@ A mail rule of one account: conditions an email must match, and what to do with *Checks:* `CHECK ("conditions" IS NULL OR json_valid("conditions"))`, `CHECK ("actions" IS NULL OR json_valid("actions"))` +### `mail_sort_rules` + +A sorting rule over mail, the owner's or the program's: what one mail, a List-Id, a subject pattern, an address or a registrable domain is. The first scope that matches wins in that order, then the header classifier; within a scope the owner's rule beats the program's and the newest wins. Not `mail_rules`, which decides how one account's sync stores mail. + +| Column | Type | Constraints | References | Meaning | +|---|---|---|---|---| +| `id` | integer | PK | | | +| `scope` | text | not null | | `mail`, `list`, `subject`, `address` or `domain` | +| `value` | text | not null | | the email's id, the List-Id, the folded subject pattern, the lower-case address or the registrable domain | +| `mail_type` | text | | | the type it gives each mail it matches; null leaves the type to the classifier | +| `sender` | text | | | `bot` or `person`: what the sender becomes, for its whole history; the owner's only | +| `organization_id` | integer | | | the organization the sender's addresses are filed under; no foreign key, a gone one files nothing | +| `over_addresses` | integer | not null | | 1: this domain rule beats the address rules at its domain | +| `past` | integer | not null | | 1: past mail too; 0: only mail dated from `created_at` on | +| `author` | text | not null | | `owner` or `program` | +| `decided_by` | text | | | the bot that made a program's rule | +| `reason` | text | | | why, in the owner's or the program's words | +| `created_at` | integer | not null | | when this row was saved here | +| `updated_at` | integer | not null | | when this row last changed here | +| `removed_at` | integer | | | removed; kept so the removal can be undone | +| `undone_at` | integer | | | its add was undone; the next undo goes further back | + +*Keys and indexes:* `INDEX (scope, value)` + +### `mail_sort_effects` + +What a sorting rule did to one sender identity beyond its mail types: the sender moved to a bot or a person, or its address filed under an organization. A removal of the rule puts back `before`. A trigger drops an identity's rows with it. + +| Column | Type | Constraints | References | Meaning | +|---|---|---|---|---| +| `id` | integer | PK | | | +| `rule_id` | integer | not null | | the `mail_sort_rules` row | +| `identity_id` | integer | not null | | no foreign key, as the bot tables: an older build purging an account does not know this table | +| `action` | text | not null | | `sender` or `organization` | +| `before` | text | | | `person:` or `sender-bot:` it was held by; for `organization`, `held` when it already was | +| `after` | text | | | where the rule put it; equal to `before` when the rule left it, as for past senders | +| `created_at` | integer | not null | | when this row was saved here | +| `undone_at` | integer | | | put back when the rule was removed | + +*Keys and indexes:* `INDEX (rule_id)`, `INDEX (identity_id)` + ### `email_recipients` One address on an email. diff --git a/drizzle/20261125205013_version-77-mail-sort-rules/migration.sql b/drizzle/20261125205013_version-77-mail-sort-rules/migration.sql new file mode 100644 index 000000000..f8c0a21b1 --- /dev/null +++ b/drizzle/20261125205013_version-77-mail-sort-rules/migration.sql @@ -0,0 +1,34 @@ +CREATE TABLE `mail_sort_effects` ( + `id` integer PRIMARY KEY AUTOINCREMENT, + `rule_id` integer NOT NULL, + `identity_id` integer NOT NULL, + `action` text NOT NULL, + `before` text, + `after` text, + `created_at` integer NOT NULL, + `undone_at` integer +); +--> statement-breakpoint +CREATE TABLE `mail_sort_rules` ( + `id` integer PRIMARY KEY AUTOINCREMENT, + `scope` text NOT NULL, + `value` text NOT NULL, + `mail_type` text, + `sender` text, + `organization_id` integer, + `over_addresses` integer NOT NULL, + `past` integer NOT NULL, + `author` text NOT NULL, + `decided_by` text, + `reason` text, + `created_at` integer NOT NULL, + `updated_at` integer NOT NULL, + `removed_at` integer, + `undone_at` integer +); +--> statement-breakpoint +ALTER TABLE `emails` ADD `sort_checked` integer;--> statement-breakpoint +CREATE INDEX `emails_sort_to_check` ON `emails` (`id`) WHERE mail_type IS NOT NULL AND sort_checked IS NULL;--> statement-breakpoint +CREATE INDEX `mail_sort_effects_by_rule_id` ON `mail_sort_effects` (`rule_id`);--> statement-breakpoint +CREATE INDEX `mail_sort_effects_by_identity_id` ON `mail_sort_effects` (`identity_id`);--> statement-breakpoint +CREATE INDEX `mail_sort_rules_by_scope_value` ON `mail_sort_rules` (`scope`,`value`); \ No newline at end of file diff --git a/drizzle/20261125205013_version-77-mail-sort-rules/snapshot.json b/drizzle/20261125205013_version-77-mail-sort-rules/snapshot.json new file mode 100644 index 000000000..d5ace3c05 --- /dev/null +++ b/drizzle/20261125205013_version-77-mail-sort-rules/snapshot.json @@ -0,0 +1,26999 @@ +{ + "version": "7", + "dialect": "sqlite", + "id": "5d0931d7-e68f-444d-aeac-90273f91ee82", + "prevIds": [ + "f49bfccb-c77e-4c31-a13a-c0378c44f6af" + ], + "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": "mail_sort_effects", + "entityType": "tables" + }, + { + "name": "mail_sort_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": "emails", + "name": "mail_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "reach", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "type_signal", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "sort_checked", + "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": "mail_sort_effects", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "rule_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "action", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "before", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "after", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "undone_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "mail_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "sender", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "over_addresses", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "past", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "decided_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "removed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "undone_at", + "type": "integer", + "notNull": false, + "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_mail_type", + "columns": [ + { + "value": "mail_type", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_type_to_work_out", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "mail_type IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_sort_to_check", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "mail_type IS NOT NULL AND sort_checked IS 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": "mail_sort_effects", + "name": "mail_sort_effects_by_rule_id", + "columns": [ + { + "value": "rule_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mail_sort_effects", + "name": "mail_sort_effects_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mail_sort_rules", + "name": "mail_sort_rules_by_scope_value", + "columns": [ + { + "value": "scope", + "isExpression": false + }, + { + "value": "value", + "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": "mail_sort_effects", + "name": "mail_sort_effects_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mail_sort_rules", + "name": "mail_sort_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/20261125205014_version-77-mail-sort-triggers/migration.sql b/drizzle/20261125205014_version-77-mail-sort-triggers/migration.sql new file mode 100644 index 000000000..813f56e62 --- /dev/null +++ b/drizzle/20261125205014_version-77-mail-sort-triggers/migration.sql @@ -0,0 +1,10 @@ +UPDATE emails SET sort_checked = 1 WHERE mail_type IS NOT NULL; +--> statement-breakpoint +CREATE TRIGGER mail_sort_checked_au AFTER UPDATE OF mail_type ON emails +WHEN NEW.mail_type IS NULL AND NEW.sort_checked IS NOT NULL BEGIN + UPDATE emails SET sort_checked = NULL WHERE id = NEW.id; +END; +--> statement-breakpoint +CREATE TRIGGER mail_sort_effects_identity_ad AFTER DELETE ON identities BEGIN + DELETE FROM mail_sort_effects WHERE identity_id = OLD.id; +END; \ No newline at end of file diff --git a/drizzle/20261125205014_version-77-mail-sort-triggers/snapshot.json b/drizzle/20261125205014_version-77-mail-sort-triggers/snapshot.json new file mode 100644 index 000000000..b8aa004b4 --- /dev/null +++ b/drizzle/20261125205014_version-77-mail-sort-triggers/snapshot.json @@ -0,0 +1,26999 @@ +{ + "id": "addcb3fc-390f-49aa-9304-1a96f3ddde14", + "prevIds": [ + "5d0931d7-e68f-444d-aeac-90273f91ee82" + ], + "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": "mail_sort_effects", + "entityType": "tables" + }, + { + "name": "mail_sort_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": "emails", + "name": "mail_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "reach", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "type_signal", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "sort_checked", + "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": "mail_sort_effects", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "rule_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "action", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "before", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "after", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_effects", + "name": "undone_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "mail_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "sender", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "over_addresses", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "past", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "decided_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "removed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_sort_rules", + "name": "undone_at", + "type": "integer", + "notNull": false, + "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_mail_type", + "columns": [ + { + "value": "mail_type", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_type_to_work_out", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "mail_type IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_sort_to_check", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "mail_type IS NOT NULL AND sort_checked IS 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": "mail_sort_effects", + "name": "mail_sort_effects_by_rule_id", + "columns": [ + { + "value": "rule_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mail_sort_effects", + "name": "mail_sort_effects_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mail_sort_rules", + "name": "mail_sort_rules_by_scope_value", + "columns": [ + { + "value": "scope", + "isExpression": false + }, + { + "value": "value", + "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": "mail_sort_effects", + "name": "mail_sort_effects_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mail_sort_rules", + "name": "mail_sort_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 04ff3dae9..7b866d447 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "./update" ], "store": { - "speaks": 76, + "speaks": 77, "minCompatible": 73 } }, diff --git a/scripts/schema/codegen/gen-schema.mjs b/scripts/schema/codegen/gen-schema.mjs index 73358c772..a21fc22aa 100644 --- a/scripts/schema/codegen/gen-schema.mjs +++ b/scripts/schema/codegen/gen-schema.mjs @@ -88,6 +88,7 @@ const NAMES = { "projects:id WHERE name_folded IS NULL": "projects_name_to_fold", "persons:id WHERE kind IS NULL": "persons_kind_to_work_out", "emails:id WHERE mail_type IS NULL": "emails_type_to_work_out", + "emails:id WHERE mail_type IS NOT NULL AND sort_checked IS NULL": "emails_sort_to_check", "meetings:id WHERE join_url IS NOT NULL AND join_key IS NULL": "meetings_join_key_to_fill", "account_identities:identity_id WHERE address_book = 1": "account_identities_in_address_book", "emails:coalesce(json_extract(headers, '$.\"list-id\"'), json_extract(metadata, '$.listId'))": "emails_by_list_id", diff --git a/scripts/schema/mail-sorting.mjs b/scripts/schema/mail-sorting.mjs new file mode 100644 index 000000000..cfee29f21 --- /dev/null +++ b/scripts/schema/mail-sorting.mjs @@ -0,0 +1,58 @@ +import { c, id, ts } from "./columns.mjs" + +const mailSortRulesTable = { + name: "mail_sort_rules", + doc: "A sorting rule over mail, the owner's or the program's: what one mail, a List-Id, a subject pattern, an address or a registrable domain is. The first scope that matches wins in that order, then the header classifier; within a scope the owner's rule beats the program's and the newest wins. Not `mail_rules`, which decides how one account's sync stores mail.", + cols: [ + id(), + c("scope", "text", { notnull: true, note: "`mail`, `list`, `subject`, `address` or `domain`" }), + c("value", "text", { + notnull: true, + note: "the email's id, the List-Id, the folded subject pattern, the lower-case address or the registrable domain", + }), + c("mail_type", "text", { note: "the type it gives each mail it matches; null leaves the type to the classifier" }), + c("sender", "text", { + note: "`bot` or `person`: what the sender becomes, for its whole history; the owner's only", + }), + c("organization_id", "integer", { + note: "the organization the sender's addresses are filed under; no foreign key, a gone one files nothing", + }), + c("over_addresses", "integer", { + notnull: true, + note: "1: this domain rule beats the address rules at its domain", + }), + c("past", "integer", { notnull: true, note: "1: past mail too; 0: only mail dated from `created_at` on" }), + c("author", "text", { notnull: true, note: "`owner` or `program`" }), + c("decided_by", "text", { note: "the bot that made a program's rule" }), + c("reason", "text", { note: "why, in the owner's or the program's words" }), + ...ts(), + c("removed_at", "integer", { note: "removed; kept so the removal can be undone" }), + c("undone_at", "integer", { + note: "its add was undone; the next undo goes further back", + }), + ], + keys: ["INDEX (scope, value)"], +} + +const mailSortEffectsTable = { + name: "mail_sort_effects", + doc: "What a sorting rule did to one sender identity beyond its mail types: the sender moved to a bot or a person, or its address filed under an organization. A removal of the rule puts back `before`. A trigger drops an identity's rows with it.", + cols: [ + id(), + c("rule_id", "integer", { notnull: true, note: "the `mail_sort_rules` row" }), + c("identity_id", "integer", { + notnull: true, + note: "no foreign key, as the bot tables: an older build purging an account does not know this table", + }), + c("action", "text", { notnull: true, note: "`sender` or `organization`" }), + c("before", "text", { + note: "`person:` or `sender-bot:` it was held by; for `organization`, `held` when it already was", + }), + c("after", "text", { note: "where the rule put it; equal to `before` when the rule left it, as for past senders" }), + c("created_at", "integer", { notnull: true }), + c("undone_at", "integer", { note: "put back when the rule was removed" }), + ], + keys: ["INDEX (rule_id)", "INDEX (identity_id)"], +} + +export const mailSortingTables = [mailSortRulesTable, mailSortEffectsTable] diff --git a/scripts/schema/spec.mjs b/scripts/schema/spec.mjs index 62e977d67..e2e383b4d 100644 --- a/scripts/schema/spec.mjs +++ b/scripts/schema/spec.mjs @@ -9,6 +9,7 @@ import { decisionRequestTables } from "./decision-requests.mjs" import { annotationTransferTable, documentHistoryTables, documentRemoval } from "./document-transfers.mjs" import { enrichmentTables } from "./enrichments.mjs" import { financeTables } from "./finance.mjs" +import { mailSortingTables } from "./mail-sorting.mjs" import { recordTables } from "./records.mjs" import { linkRevisionsTable, RELATIONSHIP_KEY, relationshipColumns } from "./relationships.mjs" import { senderBotTables } from "./sender-bots.mjs" @@ -675,6 +676,9 @@ const NEW = { note: "`direct`, `group` or `broadcast`: how it reached the owner; kept with `mail_type`", }), c("type_signal", "text", { note: "what decided `mail_type`, such as `list-id`; kept with it" }), + c("sort_checked", "integer", { + note: "1: `mail_type` was worked out with the sorting rules; a build before version 77 leaves it null", + }), ], keys: [ "UNIQUE (account_id, external_id)", @@ -682,6 +686,7 @@ const NEW = { "INDEX (mail_rule_id) WHERE mail_rule_id IS NOT NULL", "INDEX (mail_type)", "INDEX (id) WHERE mail_type IS NULL", + "INDEX (id) WHERE mail_type IS NOT NULL AND sort_checked IS NULL", `INDEX (coalesce(json_extract(headers, '$."list-id"'), json_extract(metadata, '$.listId')))`, ], }, @@ -704,6 +709,7 @@ const NEW = { ], keys: ["UNIQUE (account_id, conditions)"], }, + ...mailSortingTables, { name: "email_recipients", doc: "One address on an email.", diff --git a/src/errors/reasons.ts b/src/errors/reasons.ts index fa337fcbf..556111b5c 100644 --- a/src/errors/reasons.ts +++ b/src/errors/reasons.ts @@ -740,6 +740,31 @@ const OTHERS: Entry[] = [ 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("mail-sort.scope", "a sorting rule's scope is mail, list, subject, address or domain"), + validation("mail-sort.apply-to", "a sorting rule says whether it sorts past mail too: applyTo all or new"), + validation("mail-sort.value", "the value names no mail, list, subject, address or domain of that scope"), + validation("mail-sort.mail-type", "the mail type is not one of the known types"), + validation("mail-sort.sender", "a sorting rule makes a sender a bot or a person"), + validation("mail-sort.no-action", "a sorting rule sets a mail type, a sender or an organization"), + validation( + "mail-sort.owner-only", + "only the owner moves or files senders, undoes and resets; a program removes its own rules", + ), + validation("mail-sort.sender-scope", "a sorting rule moves or files a sender at address or domain scope only"), + validation( + "mail-sort.sender-new", + "a sender moves with its whole history, so an address rule that moves one applies to all", + ), + validation("mail-sort.over-addresses", "only a domain rule can beat the address rules"), + validation("mail-sort.free-mail-program", "only the owner sets a sorting rule on a free-mail or throwaway domain"), + validation("mail-sort.organization", "the organization named is not in the store"), + validation( + "mail-sort.confirm", + "a free-mail domain rule needs the confirm of a dry run whose counts still hold; run the dry run again", + ), + validation("mail-sort.sender-ref", "the sender is named by an address, a person: ref or a sender-bot: ref"), + ["mail-sort.not-found", "not_found", "no mail sorting rule has that id; the rules list names them"], + ["mail-sort.email", "not_found", "no incoming email has that id"], 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"), validation("identity-split.dedicated-review", "a split of a person is staged and decided through the people review"), diff --git a/src/mail/headers.ts b/src/mail/headers.ts index 11152e2a6..554e3c54b 100644 --- a/src/mail/headers.ts +++ b/src/mail/headers.ts @@ -135,7 +135,8 @@ const nameOf = (value: string): string | undefined => { return name ? decodeWords(name) : undefined } -const listIdOf = (raw: string | undefined): string | undefined => +/** A List-Id as the store keeps it: the part inside angle brackets, lower case. */ +export const listIdOf = (raw: string | undefined): string | undefined => raw === undefined ? undefined : (/<([^>]+)>/.exec(raw)?.[1] ?? raw).trim().toLowerCase() || undefined /** The header fields of one email, from its header text. */ diff --git a/src/mail/sort-rules.test.ts b/src/mail/sort-rules.test.ts new file mode 100644 index 000000000..e56d0567c --- /dev/null +++ b/src/mail/sort-rules.test.ts @@ -0,0 +1,81 @@ +import { describe, expect, it } from "vitest" +import { type SortRuleFacts, type SortScope, sortIndexOf, sortRuleFor, sortValueOf } from "./sort-rules.js" + +let next = 0 +const rule = (scope: SortScope, value: string, extra: Partial = {}): SortRuleFacts => { + next += 1 + return { id: next, scope, value, author: "owner", overAddresses: false, past: true, createdAt: next, ...extra } +} + +const mail = (from: string, extra: { subject?: string; list?: string; at?: number; id?: number } = {}) => ({ + id: extra.id ?? 1, + from, + subject: extra.subject ?? null, + list: extra.list ?? null, + at: extra.at ?? 1_000, +}) + +const winner = (rules: SortRuleFacts[], one: ReturnType) => sortRuleFor(sortIndexOf(rules), one)?.id + +describe("which sorting rule decides a mail", () => { + it("takes the first scope that has one: mail, then list or subject, then address, then domain", () => { + const domain = rule("domain", "shop.example") + const address = rule("address", "orders@shop.example") + const subject = rule("subject", "your order 0") + const list = rule("list", "deals.shop.example") + const own = rule("mail", "7") + const all = [domain, address, subject, list, own] + expect( + winner(all, mail("orders@shop.example", { id: 7, subject: "Your order 4411", list: "deals.shop.example" })), + ).toBe(own.id) + expect(winner(all, mail("orders@shop.example", { subject: "Your order 4411" }))).toBe(subject.id) + expect(winner(all, mail("orders@shop.example", { list: "deals.shop.example" }))).toBe(list.id) + expect(winner(all, mail("orders@shop.example"))).toBe(address.id) + expect(winner(all, mail("news@mail.shop.example"))).toBe(domain.id) + }) + + it("puts the owner's rule over the program's within a scope, then the newest", () => { + const owner = rule("address", "ann@shop.example") + const program = rule("address", "ann@shop.example", { author: "program" }) + const newer = rule("address", "ann@shop.example") + expect(winner([owner, program], mail("ann@shop.example"))).toBe(owner.id) + expect(winner([owner, program, newer], mail("ann@shop.example"))).toBe(newer.id) + const programMail = rule("mail", "1", { author: "program" }) + expect(winner([newer, programMail], mail("ann@shop.example"))).toBe(programMail.id) + }) + + it("lets a domain rule beat the address rules only when it says so", () => { + const address = rule("address", "ann@shop.example") + const domain = rule("domain", "shop.example") + const over = rule("domain", "shop.example", { overAddresses: true }) + expect(winner([address, domain], mail("ann@shop.example"))).toBe(address.id) + expect(winner([address, over], mail("ann@shop.example"))).toBe(over.id) + }) + + it("matches addresses whole and domains on a label boundary", () => { + const ann = rule("address", "ann@shop.example") + const domain = rule("domain", "shop.example") + expect(winner([ann], mail("joann@shop.example"))).toBeUndefined() + expect(winner([domain], mail("ann@myshop.example"))).toBeUndefined() + expect(winner([domain], mail("ann@shop.example.evil.example"))).toBeUndefined() + expect(winner([domain], mail("ann@a.b.shop.example"))).toBe(domain.id) + }) + + it("leaves mail dated before a rule made for new mail only to the next rule", () => { + const fresh = rule("address", "ann@shop.example", { past: false, createdAt: 5_000 }) + const domain = rule("domain", "shop.example") + expect(winner([fresh, domain], mail("ann@shop.example", { at: 4_999 }))).toBe(domain.id) + expect(winner([fresh, domain], mail("ann@shop.example", { at: 5_000 }))).toBe(fresh.id) + }) + + it("keeps each scope's value in one form", () => { + expect(sortValueOf("domain", "News.Mail.Shop.co.uk")).toBe("shop.co.uk") + expect(sortValueOf("domain", "ann@mail.shop.example")).toBe("shop.example") + expect(sortValueOf("domain", "co.uk")).toBeUndefined() + expect(sortValueOf("address", "Ann@Shop.Example")).toBe("ann@shop.example") + expect(sortValueOf("address", "ann@")).toBeUndefined() + expect(sortValueOf("list", "Deals ")).toBe("deals.shop.example") + expect(sortValueOf("subject", " Your ORDER #4411 ")).toBe("your order #0") + expect(sortValueOf("mail", "0")).toBeUndefined() + }) +}) diff --git a/src/mail/sort-rules.ts b/src/mail/sort-rules.ts new file mode 100644 index 000000000..82ae948be --- /dev/null +++ b/src/mail/sort-rules.ts @@ -0,0 +1,133 @@ +import { getDomain } from "tldts" +import { listIdOf } from "./headers.js" +import type { MailType } from "./mail-types.js" + +/** What a sorting rule names, most specific first. @experimental */ +export const SORT_SCOPES = ["mail", "list", "subject", "address", "domain"] as const +/** @experimental */ +export type SortScope = (typeof SORT_SCOPES)[number] + +/** A List-Id and a subject pattern are one level: neither is more specific than the other. */ +const LEVEL: Record = { mail: 1, list: 2, subject: 2, address: 3, domain: 4 } + +/** @experimental */ +export type SortAuthor = "owner" | "program" + +/** One sorting rule as the matcher reads it. @experimental */ +export interface SortRuleFacts { + id: number + scope: SortScope + value: string + author: SortAuthor + /** A domain rule that beats the address rules at its domain. */ + overAddresses: boolean + /** `false`: only mail dated from `createdAt` on. */ + past: boolean + createdAt: number +} + +/** What a rule is matched against for one email. @experimental */ +export interface SortedMail { + id: number + /** Lower case. */ + from: string | null + subject: string | null + /** As `listIdOf` keeps it. */ + list: string | null + /** The mail's own date, ms. */ + at: number | null +} + +/** A subject pattern: any case, and any number stands for any other, so "Order 4411" matches "order 9". */ +export const subjectKeyOf = (text: string): string => + text.toLowerCase().replace(/\d+/g, "0").replace(/\s+/g, " ").trim() + +const hostOf = (address: string): string => address.slice(address.lastIndexOf("@") + 1) + +/** The registrable domains a host sits under, itself first: `a.mail.shop.example` → `mail.shop.example`, `shop.example`… */ +const suffixesOf = (host: string): string[] => { + const labels = host.split(".") + return labels.slice(0, -1).map((_, at) => labels.slice(at).join(".")) +} + +/** The owner's rule first, then the newest. */ +const before = (a: SortRuleFacts, b: SortRuleFacts) => + (a.author === "owner" ? 0 : 1) - (b.author === "owner" ? 0 : 1) || b.createdAt - a.createdAt || b.id - a.id + +/** Rules filed by what they name, each list in the order a match takes them. @experimental */ +export interface SortIndex { + byKey: Map + subjects: R[] + size: number +} + +const keyOf = (scope: SortScope, value: string) => `${scope}\u0000${value}` + +/** @experimental */ +export const sortIndexOf = (rules: readonly R[]): SortIndex => { + const byKey = new Map() + const subjects: R[] = [] + for (const rule of rules) { + if (rule.scope === "subject") subjects.push(rule) + else byKey.set(keyOf(rule.scope, rule.value), [...(byKey.get(keyOf(rule.scope, rule.value)) ?? []), rule]) + } + for (const list of byKey.values()) list.sort(before) + return { byKey, subjects: subjects.sort(before), size: rules.length } +} + +const applies = (rule: SortRuleFacts, mail: SortedMail) => rule.past || (mail.at !== null && mail.at >= rule.createdAt) + +const first = (rules: readonly R[], mail: SortedMail): R | undefined => + rules.find((rule) => applies(rule, mail)) + +/** + * The rule that decides this email, the first scope that has one: the mail, its List-Id or a subject pattern, its + * address, its domain. Within a scope the owner's rule beats the program's and the newest wins. A domain rule marked + * `overAddresses` beats the address rules. Addresses match whole and domains on a label boundary, so `ann@` never + * matches `joann@` and `shop.example` never matches `myshop.example`. @experimental + */ +export const sortRuleFor = (index: SortIndex, mail: SortedMail): R | undefined => { + if (index.size === 0) return undefined + const at = (scope: SortScope, value: string | null) => + value === null ? undefined : first(index.byKey.get(keyOf(scope, value)) ?? [], mail) + const own = at("mail", String(mail.id)) + if (own !== undefined) return own + const subject = mail.subject === null ? undefined : subjectKeyOf(mail.subject) + const second = [ + at("list", mail.list), + subject === undefined + ? undefined + : first( + index.subjects.filter((rule) => subject.includes(rule.value)), + mail, + ), + ].filter((rule): rule is R => rule !== undefined) + if (second.length > 0) return second.sort(before)[0] + if (mail.from === null || !mail.from.includes("@")) return undefined + const domain = suffixesOf(hostOf(mail.from)) + .map((host) => at("domain", host)) + .find((rule) => rule !== undefined) + if (domain?.overAddresses) return domain + return at("address", mail.from) ?? domain +} + +/** Whether a scope is more specific than another. @experimental */ +export const narrower = (a: SortScope, b: SortScope): boolean => LEVEL[a] < LEVEL[b] + +/** What a rule of this scope keeps as its value, or `undefined` when the value names nothing. @experimental */ +export const sortValueOf = (scope: SortScope, value: string | number): string | undefined => { + const text = String(value).trim() + if (scope === "mail") return /^[1-9]\d*$/.test(text) ? text : undefined + if (scope === "list") return listIdOf(text) + if (scope === "subject") return subjectKeyOf(text) || undefined + if (scope === "address") return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(text) ? text.toLowerCase() : undefined + return getDomain(text.replace(/^.*@/, "").toLowerCase()) ?? undefined +} + +/** What a rule sets on mail and on its sender. @experimental */ +export interface SortAction { + mailType?: MailType + sender?: "bot" | "person" + /** `organization:`. */ + organization?: string +} diff --git a/src/store/mail-sorting.test.ts b/src/store/mail-sorting.test.ts new file mode 100644 index 000000000..f8ef9781a --- /dev/null +++ b/src/store/mail-sorting.test.ts @@ -0,0 +1,332 @@ +import { mkdtempSync } from "node:fs" +import { tmpdir } from "node:os" +import { join } from "node:path" +import { afterEach, describe, expect, it } from "vitest" +import type { CacheDatabase } from "./driver.js" +import { openCache } from "./open.js" +import type { EmailInput } from "./sqlite/emails.js" +import { type AccountKey, type MessageStore, openStore } from "./store.js" + +const MAIL: AccountKey = { provider: "email", account: "owner@home.example.com" } +const NOW = Date.parse("2026-11-25T12:00:00Z") +const DAY = 86_400_000 + +const handles: { close(): unknown }[] = [] +afterEach(async () => { + for (const handle of handles.splice(0)) await handle.close() +}) + +let n = 0 +const email = (from: string, subject: string, at = NOW - DAY): EmailInput => { + n += 1 + return { + externalId: ``, + subject, + from: { address: from, name: from.split("@")[0] ?? null }, + to: [{ address: MAIL.account, name: null }], + sentAt: at, + receivedAt: at, + bodyText: null, + } +} + +interface Opened { + store: MessageStore + db: CacheDatabase + save(emails: EmailInput[]): Promise +} + +const opened = async (emails: EmailInput[], now = () => NOW): Promise => { + const path = join(mkdtempSync(join(tmpdir(), "mail-sorting-")), "store.db") + const store = await openStore({ path, now }) + handles.push(store) + const accountId = await store.accounts.saveAccount(MAIL, { name: null }) + const save = async (batch: EmailInput[]) => { + await store.mail.saveThreads( + batch.map((one) => ({ accountId, externalId: `t-${one.externalId}`, now: NOW, emails: [one] })), + ) + } + await save(emails) + const db = await openCache(path) + handles.push(db) + return { store, db, save } +} + +const types = async (store: MessageStore) => + Object.fromEntries( + (await store.mail.emails({ limit: 500 })).map((one) => [one.subject, `${one.mailType} ${one.typeSignal}`]), + ) + +const idOf = async (store: MessageStore, subject: string) => + (await store.mail.emails({ limit: 500 })).find((one) => one.subject === subject)?.id as number + +describe("mail sorting rules", () => { + it("types an address's past mail by the owner's rule, says which rule, and takes it back on removal", async () => { + const { store } = await opened([ + email("ann@shop.example", "Hello from Ann"), + email("joann@shop.example", "Hello from Jo"), + ]) + expect(await types(store)).toEqual({ "Hello from Ann": "personal person", "Hello from Jo": "personal person" }) + const { rule, preview } = await store.mail.sorting.add( + { scope: "address", value: "Ann@Shop.Example", mailType: "promotion", applyTo: "all" }, + "owner", + ) + expect(preview).toMatchObject({ label: "every mail from ann@shop.example", emails: 1, retyped: 1, freeMail: false }) + expect(await types(store)).toEqual({ + "Hello from Ann": `promotion rule:${rule?.id}`, + "Hello from Jo": "personal person", + }) + expect((await store.mail.emails({ types: ["promotion"] })).map((one) => one.subject)).toEqual(["Hello from Ann"]) + + await store.mail.sorting.remove(rule?.id as number, "owner") + expect(await types(store)).toEqual({ "Hello from Ann": "personal person", "Hello from Jo": "personal person" }) + expect((await store.mail.sorting.rules({ removed: true })).map(({ id }) => id)).toEqual([rule?.id]) + }) + + it("leaves past mail alone when the rule is for new mail only", async () => { + const { store, save } = await opened([email("ann@shop.example", "Before")]) + const { rule } = await store.mail.sorting.add( + { scope: "address", value: "ann@shop.example", mailType: "newsletter", applyTo: "new" }, + "owner", + ) + await save([ + email("ann@shop.example", "After", NOW + 60_000), + email("ann@shop.example", "Backfilled", NOW - 9 * DAY), + ]) + expect(await types(store)).toEqual({ + Before: "personal person", + After: `newsletter rule:${rule?.id}`, + Backfilled: "personal person", + }) + }) + + it("orders scopes and authors: mail over address over domain, the owner over the program", async () => { + const { store } = await opened([ + email("orders@shop.example", "Receipt 1"), + email("orders@shop.example", "Receipt 2"), + email("news@mail.shop.example", "Weekly"), + ]) + const domain = await store.mail.sorting.add( + { scope: "domain", value: "shop.example", mailType: "promotion", applyTo: "all" }, + "owner", + ) + const address = await store.mail.sorting.add( + { scope: "address", value: "orders@shop.example", mailType: "order", applyTo: "all" }, + "owner", + ) + const program = await store.mail.sorting.add( + { scope: "address", value: "orders@shop.example", mailType: "bill", applyTo: "all" }, + { bot: "sorter", reason: "learned" }, + ) + const one = await store.mail.sorting.add( + { scope: "mail", value: await idOf(store, "Receipt 2"), mailType: "shipping", applyTo: "all" }, + "owner", + ) + expect(program.preview.retyped).toBe(0) + expect(await types(store)).toEqual({ + "Receipt 1": `order rule:${address.rule?.id}`, + "Receipt 2": `shipping rule:${one.rule?.id}`, + Weekly: `promotion rule:${domain.rule?.id}`, + }) + await store.mail.sorting.add( + { scope: "domain", value: "shop.example", mailType: "account_notice", overAddresses: true, applyTo: "all" }, + "owner", + ) + expect((await types(store))["Receipt 1"]).toMatch(/^account_notice /) + }) + + it("sets a free-mail domain rule only after a dry run, and never widens a correction to it", async () => { + const { store } = await opened([ + email("ann@gmail.com", "From Ann"), + email("bob@gmail.com", "From Bob"), + email("bob@gmail.com", "Bob again"), + ]) + const scopes = await store.mail.sorting.scopes(await idOf(store, "From Ann")) + expect(scopes.map(({ scope, freeMail }) => `${scope}${freeMail ? " free-mail" : ""}`)).toEqual([ + "mail", + "address", + "domain free-mail", + ]) + await store.mail.sorting.add( + { scope: "address", value: "ann@gmail.com", mailType: "promotion", applyTo: "all" }, + "owner", + ) + expect((await store.mail.sorting.rules()).map(({ scope }) => scope)).toEqual(["address"]) + expect((await types(store))["From Bob"]).toBe("personal person") + + const rule = { scope: "domain", value: "gmail.com", mailType: "newsletter", applyTo: "all" } as const + await expect(store.mail.sorting.add(rule, "owner")).rejects.toMatchObject({ + details: { reason: "mail-sort.confirm" }, + }) + await expect( + store.mail.sorting.add(rule, { bot: "sorter", reason: "learned" }, { dryRun: true }), + ).rejects.toMatchObject({ details: { reason: "mail-sort.free-mail-program" } }) + const dry = await store.mail.sorting.add(rule, "owner", { dryRun: true }) + expect(dry).toMatchObject({ applied: false, preview: { freeMail: true, addresses: 2, emails: 3, retyped: 2 } }) + const listed = await store.mail.sorting.add({ ...rule, value: "seznam.cz" }, "owner", { dryRun: true }) + expect(listed.preview.freeMail).toBe(true) + expect((await store.mail.sorting.rules()).map(({ scope }) => scope)).toEqual(["address"]) + const set = await store.mail.sorting.add(rule, "owner", { confirm: dry.preview.confirm as string }) + expect(set.applied).toBe(true) + expect(await types(store)).toEqual({ + "From Ann": expect.stringMatching(/^promotion /), + "From Bob": `newsletter rule:${set.rule?.id}`, + "Bob again": `newsletter rule:${set.rule?.id}`, + }) + }) + + it("refuses a stale confirm: the counts it was given for no longer hold", async () => { + const { store, save } = await opened([email("ann@gmail.com", "From Ann")]) + const rule = { scope: "domain", value: "gmail.com", mailType: "newsletter", applyTo: "all" } as const + const dry = await store.mail.sorting.add(rule, "owner", { dryRun: true }) + await save([email("cy@gmail.com", "From Cy")]) + await expect( + store.mail.sorting.add(rule, "owner", { confirm: dry.preview.confirm as string }), + ).rejects.toMatchObject({ details: { reason: "mail-sort.confirm" } }) + }) + + it("moves a domain's senders to bots through moveToBot, keeps an address rule's person, and puts them back", async () => { + const { store, save } = await opened([ + email("orders@shop.example", "Receipt"), + email("ann@shop.example", "Hi from Ann"), + ]) + const person = await store.mail.sorting.add( + { scope: "address", value: "ann@shop.example", sender: "person", applyTo: "all" }, + "owner", + ) + const dry = await store.mail.sorting.add( + { scope: "domain", value: "shop.example", sender: "bot", applyTo: "all" }, + "owner", + { dryRun: true }, + ) + expect(dry.preview).toMatchObject({ addresses: 2, senders: 1 }) + const bots = await store.mail.sorting.add( + { scope: "domain", value: "shop.example", sender: "bot", applyTo: "all" }, + "owner", + ) + const listed = async () => + (await store.people.listBots({ limit: 10 })).items.flatMap(({ identities, author }) => + identities.map(({ id }) => `${id} ${author}`), + ) + expect(await listed()).toEqual(["orders@shop.example owner"]) + + await save([email("alerts@shop.example", "Disk full")]) + expect((await listed()).sort()).toEqual(["alerts@shop.example owner", "orders@shop.example owner"]) + + await store.mail.sorting.remove(bots.rule?.id as number, "owner") + expect(await listed()).toEqual([]) + expect(person.rule?.sender).toBe("person") + }) + + it("files a sender under an organization and takes it out again", async () => { + const { store, db } = await opened([email("orders@shop.example", "Receipt")]) + const organization = Number( + db + .prepare( + "INSERT INTO organizations (kind, name, created_at, updated_at) VALUES ('company', 'Shop', 0, 0) RETURNING id", + ) + .get()?.id, + ) + const held = () => + db + .prepare( + "SELECT oi.method FROM organization_identities oi JOIN identities i ON i.id = oi.identity_id " + + "WHERE i.external_id = 'orders@shop.example' AND oi.organization_id = ?", + ) + .all(organization) + .map((row) => String(row.method)) + const { rule } = await store.mail.sorting.add( + { scope: "address", value: "orders@shop.example", organization: `organization:${organization}`, applyTo: "all" }, + "owner", + ) + expect(held()).toEqual(["sort-rule"]) + await store.mail.sorting.remove(rule?.id as number, "owner") + expect(held()).toEqual([]) + }) + + it("undoes the owner's changes newest first, and resets a sender's manual sorting", async () => { + const { store } = await opened([email("ann@shop.example", "Hello"), email("bo@shop.example", "Hey")]) + const first = await store.mail.sorting.add( + { scope: "address", value: "ann@shop.example", mailType: "order", applyTo: "all" }, + "owner", + ) + const second = await store.mail.sorting.add( + { scope: "address", value: "bo@shop.example", mailType: "bill", applyTo: "all" }, + "owner", + ) + await store.mail.sorting.remove(first.rule?.id as number, "owner") + expect(await store.mail.sorting.undo("owner")).toMatchObject({ undid: "remove", rule: { id: first.rule?.id } }) + expect((await types(store)).Hello).toBe(`order rule:${first.rule?.id}`) + expect(await store.mail.sorting.undo("owner")).toMatchObject({ undid: "add", rule: { id: second.rule?.id } }) + expect(await store.mail.sorting.undo("owner")).toMatchObject({ undid: "add", rule: { id: first.rule?.id } }) + expect(await store.mail.sorting.undo("owner")).toBeNull() + expect(await types(store)).toEqual({ Hello: "personal person", Hey: "personal person" }) + await expect(store.mail.sorting.undo({ bot: "sorter", reason: "x" })).rejects.toMatchObject({ + details: { reason: "mail-sort.owner-only" }, + }) + + const address = await store.mail.sorting.add( + { scope: "address", value: "ann@shop.example", mailType: "order", applyTo: "all" }, + "owner", + ) + const one = await store.mail.sorting.add( + { scope: "mail", value: await idOf(store, "Hello"), mailType: "bill", applyTo: "all" }, + "owner", + ) + const domain = await store.mail.sorting.add( + { scope: "domain", value: "shop.example", mailType: "promotion", applyTo: "all" }, + "owner", + ) + const removed = await store.mail.sorting.reset("ann@shop.example", "owner") + expect(removed.map(({ id }) => id).sort()).toEqual([address.rule?.id, one.rule?.id].sort()) + expect((await store.mail.sorting.rules()).map(({ id }) => id)).toEqual([domain.rule?.id]) + expect((await types(store)).Hello).toBe(`promotion rule:${domain.rule?.id}`) + }) + + it("refuses what a rule cannot do", async () => { + const { store } = await opened([email("ann@shop.example", "Hello")]) + const add = ( + input: Parameters[0], + by: "owner" | { bot: string; reason: string } = "owner", + ) => store.mail.sorting.add(input, by) + const reasons = await Promise.all( + [ + add({ scope: "address", value: "ann@shop.example", applyTo: "all" }), + add({ scope: "address", value: "ann@", mailType: "order", applyTo: "all" }), + add({ scope: "subject", value: "sale", sender: "bot", applyTo: "all" }), + add({ scope: "address", value: "ann@shop.example", sender: "bot", applyTo: "new" }), + add({ scope: "address", value: "ann@shop.example", sender: "bot", applyTo: "all" }, { bot: "x", reason: "y" }), + add({ scope: "address", value: "ann@shop.example", mailType: "order", overAddresses: true, applyTo: "all" }), + add({ scope: "address", value: "ann@shop.example", organization: "organization:999", applyTo: "all" }), + ].map((call) => + call.then( + () => "set", + (error) => String(error.details?.reason), + ), + ), + ) + expect(reasons).toEqual([ + "mail-sort.no-action", + "mail-sort.value", + "mail-sort.sender-scope", + "mail-sort.sender-new", + "mail-sort.owner-only", + "mail-sort.over-addresses", + "mail-sort.organization", + ]) + }) + + it("types again what a build before version 77 typed without the rules", async () => { + const { store, db } = await opened([email("ann@shop.example", "Hello")]) + const { rule } = await store.mail.sorting.add( + { scope: "address", value: "ann@shop.example", mailType: "order", applyTo: "all" }, + "owner", + ) + expect(await store.mail.emails({ types: ["order"] })).toHaveLength(1) + db.prepare("UPDATE emails SET subject = 'Hello again'").run() + expect(db.prepare("SELECT sort_checked FROM emails").get()?.sort_checked).toBeNull() + db.prepare("UPDATE emails SET mail_type = 'personal', reach = 'direct', type_signal = 'person'").run() + expect((await store.mail.emails({ types: ["order"] })).map((one) => one.typeSignal)).toEqual([`rule:${rule?.id}`]) + expect(db.prepare("SELECT sort_checked FROM emails").get()?.sort_checked).toBe(1) + }) +}) diff --git a/src/store/sqlite/email-types.ts b/src/store/sqlite/email-types.ts index a6bd38d38..e2745c381 100644 --- a/src/store/sqlite/email-types.ts +++ b/src/store/sqlite/email-types.ts @@ -1,7 +1,10 @@ import type { Sector } from "../../domain/organization-sectors.js" import { SENDER_BOT_PREFIX } from "../../domain/person-kinds.js" +import { listIdOf } from "../../mail/headers.js" import { MAIL_TYPES, type MailType, type MailTypeOf, mailTypeOf, schemaTypesOf } from "../../mail/mail-types.js" +import { sortRuleFor } from "../../mail/sort-rules.js" import { type CacheDatabase, isQueryOnly } from "../driver.js" +import { typeRulesOf } from "./mail-sorting.js" import { LIST_ID, LIST_SENDERS, REACHES, type Reach, senderKey } from "./sender-signals.js" import { read, writeBatch } from "./transaction.js" @@ -15,7 +18,8 @@ const RULES_KEY = "mail.type_rules" const BATCH = 5_000 const INPUTS = - "SELECT e.id, e.from_address, e.subject, e.headers, e.body_html, " + + "SELECT e.id, e.from_address, e.subject, e.headers, e.body_html, e.outgoing, " + + "coalesce(e.received_at, e.sent_at) AS at, " + `${LIST_ID} AS list, ` + "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, " + @@ -54,6 +58,7 @@ export const typesOf = ( const found = new Map() if (ids.length === 0) return found const rows = database.prepare(INPUTS).all(JSON.stringify(ids)) + const rules = typeRulesOf(database) const lists = [ ...new Set(rows.flatMap((row) => (typeof row.list === "string" && !senders.has(row.list) ? [row.list] : []))), ] @@ -65,20 +70,32 @@ export const typesOf = ( } for (const row of rows) { const headers = parsed(row.headers) + const from = typeof row.from_address === "string" ? row.from_address.toLowerCase() : null + const typed = mailTypeOf({ + from, + subject: typeof row.subject === "string" ? row.subject : null, + headers: typeof row.list === "string" ? { ...headers, "list-id": row.list } : headers, + recipients: row.recipients == null ? null : Number(row.recipients), + parts: JSON.parse(String(row.parts ?? "[]")) as string[], + schemaTypes: schemaTypesOf(typeof row.body_html === "string" ? row.body_html : null), + listSenders: typeof row.list === "string" ? (senders.get(row.list) ?? 0) : 0, + ownerWrote: Number(row.owner_wrote) === 1, + bot: Number(row.bot) === 1, + sector: typeof row.sector === "string" ? (row.sector as Sector) : null, + }) + const rule = + Number(row.outgoing) === 1 + ? undefined + : sortRuleFor(rules, { + id: Number(row.id), + from, + subject: typeof row.subject === "string" ? row.subject : null, + list: typeof row.list === "string" ? (listIdOf(row.list) ?? null) : null, + at: row.at == null ? null : Number(row.at), + }) found.set( Number(row.id), - mailTypeOf({ - from: typeof row.from_address === "string" ? row.from_address.toLowerCase() : null, - subject: typeof row.subject === "string" ? row.subject : null, - headers: typeof row.list === "string" ? { ...headers, "list-id": row.list } : headers, - recipients: row.recipients == null ? null : Number(row.recipients), - parts: JSON.parse(String(row.parts ?? "[]")) as string[], - schemaTypes: schemaTypesOf(typeof row.body_html === "string" ? row.body_html : null), - listSenders: typeof row.list === "string" ? (senders.get(row.list) ?? 0) : 0, - ownerWrote: Number(row.owner_wrote) === 1, - bot: Number(row.bot) === 1, - sector: typeof row.sector === "string" ? (row.sector as Sector) : null, - }), + rule?.mailType == null ? typed : { ...typed, type: rule.mailType, signal: `rule:${rule.id}` }, ) } return found @@ -92,8 +109,15 @@ const rulesOf = (database: CacheDatabase): string | undefined => { const anyLeft = (database: CacheDatabase): boolean => database.prepare("SELECT 1 FROM emails WHERE mail_type IS NULL LIMIT 1").get() !== undefined +const UNCHECKED = "SELECT id FROM emails WHERE mail_type IS NOT NULL AND sort_checked IS NULL" + +/** A type a build before version 77 kept, while a sorting rule exists that it never read. */ +const anyUnchecked = (database: CacheDatabase): boolean => + typeRulesOf(database).size > 0 && database.prepare(`${UNCHECKED} LIMIT 1`).get() !== undefined + /** Whether every email's stored type is current. */ -export const typesCurrent = (database: CacheDatabase): boolean => rulesOf(database) === TYPE_RULES && !anyLeft(database) +export const typesCurrent = (database: CacheDatabase): boolean => + rulesOf(database) === TYPE_RULES && !anyLeft(database) && !anyUnchecked(database) /** * Works out and keeps the type of every email whose stored one the triggers cleared, or every email after the rules @@ -115,7 +139,15 @@ export const storeMailTypes = (database: CacheDatabase): boolean => { ) .run(RULES_KEY, TYPE_RULES, Date.now()) }) - const keep = database.prepare("UPDATE emails SET mail_type = ?, reach = ?, type_signal = ? WHERE id = ?") + if (anyUnchecked(database)) { + const clear = database.prepare( + `UPDATE emails SET mail_type = NULL, reach = NULL, type_signal = NULL WHERE id IN (${UNCHECKED} LIMIT ?)`, + ) + while (writeBatch(database, () => clear.run(BATCH).changes) === BATCH); + } + const keep = database.prepare( + "UPDATE emails SET mail_type = ?, reach = ?, type_signal = ?, sort_checked = 1 WHERE id = ?", + ) const senders = new Map() for (;;) { const more = writeBatch(database, () => { diff --git a/src/store/sqlite/emails.ts b/src/store/sqlite/emails.ts index 84af8e049..40fd764b2 100644 --- a/src/store/sqlite/emails.ts +++ b/src/store/sqlite/emails.ts @@ -44,6 +44,7 @@ import { folded } from "./folded.js" import { ensurePerson } from "./identities.js" import { nearestMailPieces } from "./mail-nearest.js" import { type MailRulesStore, mailRulesOver } from "./mail-rules.js" +import { type MailSorting, mailSortingOver, settleThreads } from "./mail-sorting.js" import { type AttachmentInput, attachmentOf, saveAttachment, wordsQuery } from "./meetings.js" import type { Orm, StoreContext } from "./open.js" import type { Reach } from "./sender-signals.js" @@ -392,6 +393,8 @@ export interface MailStore extends PartialMailStore, MailActivityStore, MailType ): Promise /** The account's mail rules, and which rule decided each email. */ readonly rules: MailRulesStore + /** Sorting rules by mail, list, subject, address and domain, apart from the storage `rules`. @experimental */ + readonly sorting: MailSorting } const ROLES = [ @@ -847,13 +850,19 @@ export const mailStoreOver = ( stemmerFor: (stemmers: Stemmers) => Stemmer = stemmerCache(), ): MailStore => ({ rules: mailRulesOver(database), + sorting: mailSortingOver({ database, orm, now }), async saveThread(input) { - const id = write(database, () => saveThread(database, orm, input)) + const id = write(database, () => { + const saved = saveThread(database, orm, input) + settleThreads({ database, orm, now }, [saved]) + return saved + }) return threadDetails(database, id) as ThreadDetails }, async saveThreads(inputs, states = []) { const ids = write(database, () => { const saved = inputs.map((input) => saveThread(database, orm, input)) + settleThreads({ database, orm, now }, saved) for (const { accountId, name, value } of states) writeState({ orm, now }, accountId, name, value) return saved }) diff --git a/src/store/sqlite/mail-sorting.ts b/src/store/sqlite/mail-sorting.ts new file mode 100644 index 000000000..5d0d90902 --- /dev/null +++ b/src/store/sqlite/mail-sorting.ts @@ -0,0 +1,710 @@ +import { createHash } from "node:crypto" +import { CliError } from "@wirecat/cli-base" +import { isPackFreeMailDomain } from "../../domain/domain-lists.js" +import { isFreeMailDomain } from "../../domain/organization-sectors.js" +import { SENDER_BOT_PREFIX } from "../../domain/person-kinds.js" +import { listIdOf } from "../../mail/headers.js" +import { MAIL_TYPES, type MailType } from "../../mail/mail-types.js" +import { FREE_MAIL, isDisposableDomain } from "../../mail/score.js" +import { + SORT_SCOPES, + type SortAuthor, + type SortedMail, + type SortIndex, + type SortScope, + sortIndexOf, + sortRuleFor, + sortValueOf, +} from "../../mail/sort-rules.js" +import type { Decider } from "../decisions.js" +import type { CacheDatabase } from "../driver.js" +import { holdAddress } from "./address-organization.js" +import type { StoreContext } from "./open.js" +import { moveToBot, moveToPerson } from "./sender-bots.js" +import { LIST_ID } from "./sender-signals.js" +import { read, write } from "./transaction.js" + +/** One sorting rule. @experimental */ +export interface SortRule { + id: number + scope: SortScope + /** The email's id, the List-Id, the subject pattern, the address or the registrable domain, as kept. */ + value: string + mailType: MailType | null + sender: "bot" | "person" | null + /** `organization:`. */ + organization: string | null + overAddresses: boolean + /** `false`: only mail dated from `createdAt` on. */ + past: boolean + author: SortAuthor + decidedBy: string | null + reason: string | null + createdAt: number + updatedAt: number + removedAt: number | null +} + +/** A correction as the caller names it: its scope, and whether past mail is sorted too. @experimental */ +export interface SortRuleInput { + scope: SortScope + /** An email's id, a List-Id, a subject pattern, an address or a domain (kept as its registrable domain). */ + value: string | number + mailType?: MailType + /** The owner's only; at `address` or `domain` scope; moves the sender for its whole history. */ + sender?: "bot" | "person" + /** `organization:`; the owner's only; at `address` or `domain` scope. */ + organization?: string + /** A domain rule that beats the address rules at its domain. */ + overAddresses?: boolean + /** `all`: mail already in the store too; `new`: only mail dated from now on. Always named. */ + applyTo: "all" | "new" + reason?: string +} + +/** What a rule would touch, before it is set. @experimental */ +export interface SortPreview { + scope: SortScope + value: string + /** The scope in words: "every mail from the domain gmail.com". */ + label: string + applyTo: "all" | "new" + /** The domain is a free-mail or throwaway one: the rule needs `confirm`. */ + freeMail: boolean + /** Distinct sender addresses its scope takes in. */ + addresses: number + /** Incoming emails its scope takes in. */ + emails: number + /** Of those, the emails whose type it would set now: a narrower rule or a past one left out. */ + retyped: number + /** Senders it would move to a bot or a person, or file under the organization. */ + senders: number + /** Pass to `add` to set a free-mail domain rule; it holds while these counts do. */ + confirm: string | null +} + +/** @experimental */ +export interface SortAddResult { + applied: boolean + preview: SortPreview + rule?: SortRule +} + +/** A scope a correction of one email may take, narrowest first: the domain is never offered first. @experimental */ +export interface SortScopeChoice { + scope: SortScope + value: string + label: string + /** A free-mail or throwaway domain: a rule there needs a dry run and its `confirm`. */ + freeMail: boolean +} + +/** @experimental */ +export interface SortUndo { + undid: "add" | "remove" + rule: SortRule +} + +/** @experimental */ +export interface MailSorting { + /** Live rules, newest first; `removed` lists the removed ones instead. */ + rules(options?: { scope?: SortScope; removed?: boolean }): Promise + /** The scopes a correction of this email may take. */ + scopes(email: number): Promise + /** + * Sets a rule, or with `dryRun` only says what it would touch. A domain rule on a free-mail or throwaway domain is + * set only with the `confirm` of a dry run whose counts still hold. A program's rule sets a mail type only. + */ + add(input: SortRuleInput, by: Decider, options?: { dryRun?: boolean; confirm?: string }): Promise + /** Removes a rule: its mail is typed again without it, and the senders it moved go back. */ + remove(rule: number, by: Decider): Promise + /** Takes back the owner's newest add or removal not yet undone; `null` when there is none. */ + undo(by: Decider): Promise + /** + * The owner's manual sorting of one sender, an address or a `person:` or `sender-bot:` ref, removed: its address + * rules and its one-mail rules. Domain and list rules stay. Answers the rules removed. + */ + reset(sender: string, by: Decider): Promise +} + +const COLUMNS = + "id, scope, value, mail_type, sender, organization_id, over_addresses, past, author, decided_by, reason, " + + "created_at, updated_at, removed_at" + +const ruleOf = (row: Record): SortRule => ({ + id: Number(row.id), + scope: String(row.scope) as SortScope, + value: String(row.value), + mailType: row.mail_type == null ? null : (String(row.mail_type) as MailType), + sender: row.sender == null ? null : (String(row.sender) as "bot" | "person"), + organization: row.organization_id == null ? null : `organization:${row.organization_id}`, + overAddresses: Number(row.over_addresses) === 1, + past: Number(row.past) === 1, + author: String(row.author) as SortAuthor, + decidedBy: row.decided_by == null ? null : String(row.decided_by), + reason: row.reason == null ? null : String(row.reason), + createdAt: Number(row.created_at), + updatedAt: Number(row.updated_at), + removedAt: row.removed_at == null ? null : Number(row.removed_at), +}) + +const liveRules = (database: CacheDatabase): SortRule[] => + database.prepare(`SELECT ${COLUMNS} FROM mail_sort_rules WHERE removed_at IS NULL`).all().map(ruleOf) + +/** The live rules that set a mail type, filed for `sortRuleFor`. */ +export const typeRulesOf = (database: CacheDatabase): SortIndex => + sortIndexOf(liveRules(database).filter((rule) => rule.mailType !== null)) + +/** A free-mail or throwaway domain, whose addresses belong to anyone: a rule there sorts strangers together. */ +export const isSharedMailDomain = (domain: string): boolean => + FREE_MAIL.has(domain) || isFreeMailDomain(domain) || isPackFreeMailDomain(domain) || isDisposableDomain(domain) + +const fail = (message: string, reason: string): never => { + throw new CliError("validation_error", message, { reason }) +} + +const labelOf = (scope: SortScope, value: string): string => + ({ + mail: `the mail ${value}`, + list: `every mail of the list ${value}`, + subject: `every mail whose subject has "${value}"`, + address: `every mail from ${value}`, + domain: `every mail from the domain ${value}`, + })[scope] + +const MAIL_ROWS = + "SELECT e.id, lower(e.from_address) AS address, e.from_identity_id AS identity, e.subject, " + + `${LIST_ID} AS list, coalesce(e.received_at, e.sent_at) AS at FROM emails e ` + + "WHERE e.deleted_at IS NULL AND e.outgoing IS NOT 1" + +interface MailRow extends SortedMail { + identity: number | null +} + +const mailRowOf = (row: Record): MailRow => ({ + id: Number(row.id), + from: typeof row.address === "string" ? row.address : null, + subject: typeof row.subject === "string" ? row.subject : null, + list: typeof row.list === "string" ? (listIdOf(row.list) ?? null) : null, + at: row.at == null ? null : Number(row.at), + identity: row.identity == null ? null : Number(row.identity), +}) + +/** The incoming emails a rule's scope takes in, whatever wins over it. */ +const inScope = (database: CacheDatabase, scope: SortScope, value: string): MailRow[] => { + const where = { + mail: ["e.id = ?", [Number(value)]], + list: [`${LIST_ID} IS NOT NULL`, []], + subject: ["e.subject IS NOT NULL", []], + address: ["lower(e.from_address) = ?", [value]], + domain: ["(lower(e.from_address) LIKE ? OR lower(e.from_address) LIKE ?)", [`%@${value}`, `%.${value}`]], + } as const + const [sql, params] = where[scope] + const alone = sortIndexOf([{ id: 0, scope, value, author: "owner", overAddresses: false, past: true, createdAt: 0 }]) + return database + .prepare(`${MAIL_ROWS} AND ${sql}`) + .all(...params) + .map(mailRowOf) + .filter((row) => sortRuleFor(alone, row) !== undefined) +} + +const ADDRESS_ONLY = { subject: null, list: null, at: Number.MAX_SAFE_INTEGER } + +/** Where an identity sits now: `sender-bot:`, `person:` or `null`. */ +const holderOf = (database: CacheDatabase, identity: number): string | null => { + const bot = database.prepare("SELECT bot_id FROM sender_bot_identities WHERE identity_id = ?").get(identity) + if (bot !== undefined) return `${SENDER_BOT_PREFIX}${bot.bot_id}` + const person = database.prepare("SELECT person_id FROM identity_links WHERE identity_id = ?").get(identity) + return person === undefined ? null : `person:${person.person_id}` +} + +const isWhere = (holder: string | null, sender: "bot" | "person") => + holder?.startsWith(sender === "bot" ? SENDER_BOT_PREFIX : "person:") === true + +interface Sender { + identity: number + address: string +} + +const sendersOf = (database: CacheDatabase, identities?: readonly number[]): Sender[] => + database + .prepare( + "SELECT DISTINCT e.from_identity_id AS identity, i.external_id AS address FROM emails e " + + "JOIN identities i ON i.id = e.from_identity_id WHERE i.provider = 'email' AND e.outgoing IS NOT 1 " + + "AND e.deleted_at IS NULL" + + (identities === undefined ? "" : " AND e.from_identity_id IN (SELECT value FROM json_each(?))"), + ) + .all(...(identities === undefined ? [] : [JSON.stringify(identities)])) + .map((row) => ({ identity: Number(row.identity), address: String(row.address).toLowerCase() })) + +const hasEffect = (database: CacheDatabase, rule: number, identity: number, action: string) => + database + .prepare( + "SELECT 1 FROM mail_sort_effects WHERE rule_id = ? AND identity_id = ? AND action = ? AND undone_at IS NULL", + ) + .get(rule, identity, action) !== undefined + +const recordEffect = ( + database: CacheDatabase, + effect: { rule: number; identity: number; action: string; before: string | null; after: string | null; at: number }, +) => + database + .prepare( + "INSERT INTO mail_sort_effects (rule_id, identity_id, action, before, after, created_at) VALUES (?, ?, ?, ?, ?, ?)", + ) + .run(effect.rule, effect.identity, effect.action, effect.before, effect.after, effect.at) + +const ownerSenderRules = (database: CacheDatabase) => { + const rules = liveRules(database).filter( + (rule) => rule.author === "owner" && (rule.scope === "address" || rule.scope === "domain"), + ) + return { + sender: sortIndexOf(rules.filter((rule) => rule.sender !== null)), + organization: sortIndexOf(rules.filter((rule) => rule.organization !== null)), + } +} + +/** Whether any rule moves senders or files them: sync then settles the senders it stored. */ +export const hasSenderRules = (database: CacheDatabase): boolean => + database + .prepare( + "SELECT 1 FROM mail_sort_rules WHERE removed_at IS NULL AND author = 'owner' " + + "AND (sender IS NOT NULL OR organization_id IS NOT NULL) LIMIT 1", + ) + .get() !== undefined + +/** + * Each sender the winning rule has not acted on yet moves to a bot or a person through `moveToBot` and `moveToPerson`, + * or is filed under the rule's organization, and the effect is logged so a removal can put it back. A sender already + * where the rule says is logged as left. The caller holds the write lock. + */ +export const settleSenders = (context: StoreContext, identities?: readonly number[]): void => { + const { database } = context + const rules = ownerSenderRules(database) + if (rules.sender.size === 0 && rules.organization.size === 0) return + for (const { identity, address } of sendersOf(database, identities)) { + const mail = { id: 0, from: address, ...ADDRESS_ONLY } + const at = context.now() + const mover = sortRuleFor(rules.sender, mail) + if (mover?.sender && !hasEffect(database, mover.id, identity, "sender")) { + const before = holderOf(database, identity) + if (!isWhere(before, mover.sender)) moveSender(context, address, mover) + recordEffect(database, { + rule: mover.id, + identity, + action: "sender", + before, + after: holderOf(database, identity), + at, + }) + } + const filer = sortRuleFor(rules.organization, mail) + if (filer?.organization && !hasEffect(database, filer.id, identity, "organization")) { + const organization = Number(filer.organization.slice("organization:".length)) + const held = + database + .prepare("SELECT 1 FROM organization_identities WHERE identity_id = ? AND organization_id = ?") + .get(identity, organization) !== undefined + if (!held) holdAddress(context, organization, address, { method: SORT_METHOD, author: "owner" }) + recordEffect(database, { + rule: filer.id, + identity, + action: "organization", + before: held ? "held" : null, + after: filer.organization, + at, + }) + } + } +} + +const SORT_METHOD = "sort-rule" + +const moveSender = (context: StoreContext, address: string, rule: SortRule) => { + const subject = { provider: "email" as const, id: address } + const reason = rule.reason ?? `mail sorting rule ${rule.id}` + if (rule.sender === "person") return void moveToPerson(context, subject, { reason }) + try { + moveToBot(context, subject, { reason }) + } catch (error) { + // The owner's own address under a domain rule stays the owner's. + if (!(error instanceof CliError && error.details?.reason === "sender-bot.owner")) throw error + } +} + +/** Puts back what a rule did to its senders, then lets the rules still live settle them. */ +const undoEffects = (context: StoreContext, rule: number): void => { + const { database } = context + const effects = database + .prepare( + "SELECT f.id, f.identity_id, f.action, f.before, f.after, i.external_id AS address FROM mail_sort_effects f " + + "JOIN identities i ON i.id = f.identity_id WHERE f.rule_id = ? AND f.undone_at IS NULL ORDER BY f.id DESC", + ) + .all(rule) + const at = context.now() + for (const effect of effects) { + const identity = Number(effect.identity_id) + const subject = { provider: "email" as const, id: String(effect.address) } + const before = effect.before == null ? null : String(effect.before) + if (effect.action === "sender" && before !== effect.after && before !== null) { + const now = holderOf(database, identity) + if (before.startsWith("person:") && !isWhere(now, "person")) moveToPerson(context, subject, { reason: "undo" }) + if (before.startsWith(SENDER_BOT_PREFIX) && !isWhere(now, "bot")) + moveToBot(context, subject, { + reason: "undo", + ...(database + .prepare("SELECT 1 FROM sender_bots WHERE id = ?") + .get(Number(before.slice(SENDER_BOT_PREFIX.length))) + ? { bot: before } + : {}), + }) + } + if (effect.action === "organization" && before === null) + database + .prepare("DELETE FROM organization_identities WHERE identity_id = ? AND organization_id = ? AND method = ?") + .run(identity, Number(String(effect.after).slice("organization:".length)), SORT_METHOD) + database.prepare("UPDATE mail_sort_effects SET undone_at = ? WHERE id = ?").run(at, Number(effect.id)) + } + const identities = [...new Set(effects.map((effect) => Number(effect.identity_id)))] + if (identities.length > 0) settleSenders(context, identities) +} + +const clearTypes = (database: CacheDatabase, ids: readonly number[]) => + database + .prepare( + "UPDATE emails SET mail_type = NULL, reach = NULL, type_signal = NULL " + + "WHERE mail_type IS NOT NULL AND id IN (SELECT value FROM json_each(?))", + ) + .run(JSON.stringify(ids)) + +const clearRuleTypes = (database: CacheDatabase, rule: SortRule) => { + database + .prepare( + "UPDATE emails SET mail_type = NULL, reach = NULL, type_signal = NULL WHERE mail_type IS NOT NULL AND type_signal = ?", + ) + .run(`rule:${rule.id}`) + if (rule.mailType === null) return + const index = sortIndexOf([...liveRules(database).filter((one) => one.mailType !== null && one.id !== rule.id), rule]) + clearTypes( + database, + inScope(database, rule.scope, rule.value) + .filter((row) => sortRuleFor(index, row)?.id === rule.id) + .map((row) => row.id), + ) +} + +interface Checked { + scope: SortScope + value: string + mailType: MailType | null + sender: "bot" | "person" | null + organization: number | null + overAddresses: boolean + past: boolean + author: SortAuthor + decidedBy: string | null + reason: string | null +} + +const checked = (database: CacheDatabase, input: SortRuleInput, by: Decider): Checked => { + if (!(SORT_SCOPES as readonly string[]).includes(input.scope)) + fail(`a rule's scope is one of ${SORT_SCOPES.join(", ")}`, "mail-sort.scope") + if (input.applyTo !== "all" && input.applyTo !== "new") + fail("a rule says whether it sorts past mail too: applyTo all or new", "mail-sort.apply-to") + const value = sortValueOf(input.scope, input.value) + if (value === undefined) return fail(`${String(input.value)} names no ${input.scope}`, "mail-sort.value") + if (input.mailType !== undefined && !(MAIL_TYPES as readonly string[]).includes(input.mailType)) + fail(`a mail type is one of ${MAIL_TYPES.join(", ")}`, "mail-sort.mail-type") + if (input.sender !== undefined && input.sender !== "bot" && input.sender !== "person") + fail("a sender becomes a bot or a person", "mail-sort.sender") + if (input.mailType === undefined && input.sender === undefined && input.organization === undefined) + fail("a rule sets a mail type, a sender or an organization", "mail-sort.no-action") + const owner = by === "owner" + const onSender = input.sender !== undefined || input.organization !== undefined + if (onSender && !owner) fail("only the owner's rule moves or files a sender", "mail-sort.owner-only") + if (onSender && input.scope !== "address" && input.scope !== "domain") + fail("a rule moves or files a sender at address or domain scope", "mail-sort.sender-scope") + if (onSender && input.scope === "address" && input.applyTo === "new") + fail("a sender moves with its whole history: an address rule that moves one applies to all", "mail-sort.sender-new") + if (input.overAddresses && input.scope !== "domain") + fail("only a domain rule can beat the address rules", "mail-sort.over-addresses") + if (!owner && input.scope === "domain" && isSharedMailDomain(value)) + fail(`only the owner sets a rule on the free-mail domain ${value}`, "mail-sort.free-mail-program") + const organization = + input.organization === undefined + ? null + : Number(/^organization:([1-9]\d*)$/.exec(input.organization)?.[1] ?? Number.NaN) + if ( + organization !== null && + (Number.isNaN(organization) || + database.prepare("SELECT 1 FROM organizations WHERE id = ? AND deleted_at IS NULL").get(organization) === + undefined) + ) + fail(`${input.organization} is no organization in the store`, "mail-sort.organization") + return { + scope: input.scope, + value, + mailType: input.mailType ?? null, + sender: input.sender ?? null, + organization, + overAddresses: input.overAddresses === true, + past: input.applyTo === "all", + author: owner ? "owner" : "program", + decidedBy: owner ? null : by.bot, + reason: input.reason ?? (owner ? null : by.reason), + } +} + +const previewOf = (database: CacheDatabase, rule: Checked, at: number): SortPreview => { + const rows = inScope(database, rule.scope, rule.value) + const candidate: SortRule = { + id: -1, + ...rule, + organization: rule.organization === null ? null : `organization:${rule.organization}`, + createdAt: at, + updatedAt: at, + removedAt: null, + } + const live = liveRules(database) + const types = sortIndexOf([...live.filter((one) => one.mailType !== null), candidate]) + const retyped = rule.mailType === null ? 0 : rows.filter((row) => sortRuleFor(types, row)?.id === -1).length + const movers = sortIndexOf([ + ...live.filter( + (one) => + one.author === "owner" && + (rule.sender !== null ? one.sender !== null : one.organization !== null) && + (one.scope === "address" || one.scope === "domain"), + ), + candidate, + ]) + const senders = + (rule.sender === null && rule.organization === null) || !rule.past + ? 0 + : sendersOf(database, [...new Set(rows.flatMap((row) => row.identity ?? []))]).filter( + ({ identity, address }) => + sortRuleFor(movers, { id: 0, from: address, ...ADDRESS_ONLY })?.id === -1 && + (rule.sender === null || !isWhere(holderOf(database, identity), rule.sender)), + ).length + const addresses = new Set(rows.flatMap((row) => row.from ?? [])).size + const freeMail = rule.scope === "domain" && isSharedMailDomain(rule.value) + const counts = { emails: rows.length, addresses, retyped, senders } + return { + scope: rule.scope, + value: rule.value, + label: labelOf(rule.scope, rule.value), + applyTo: rule.past ? "all" : "new", + freeMail, + ...counts, + confirm: freeMail + ? createHash("sha256") + .update( + JSON.stringify([rule.scope, rule.value, rule.mailType, rule.sender, rule.organization, rule.past, counts]), + ) + .digest("hex") + .slice(0, 16) + : null, + } +} + +const ruleById = (database: CacheDatabase, id: number): SortRule => { + const row = database.prepare(`SELECT ${COLUMNS} FROM mail_sort_rules WHERE id = ?`).get(id) + if (row === undefined) + throw new CliError("not_found", `no mail sorting rule ${id}`, { reason: "mail-sort.not-found" }) + return ruleOf(row) +} + +/** Applies a rule just made live: its mail is typed again, and the senders it names settle. */ +const applyRule = (context: StoreContext, rule: SortRule) => { + const { database } = context + clearRuleTypes(database, rule) + if (rule.sender === null && rule.organization === null) return + const identities = [ + ...new Set( + inScope(database, rule.scope, rule.value).flatMap((row) => (row.identity === null ? [] : [row.identity])), + ), + ] + if (!rule.past) + for (const { identity } of sendersOf(database, identities)) { + const holder = holderOf(database, identity) + for (const action of [...(rule.sender ? ["sender"] : []), ...(rule.organization ? ["organization"] : [])]) + recordEffect(database, { + rule: rule.id, + identity, + action, + before: action === "sender" ? holder : "held", + after: action === "sender" ? holder : "held", + at: context.now(), + }) + } + settleSenders(context, identities) +} + +/** A change's time, later than every change before it, so undo takes changes back in order within one millisecond. */ +const stampOf = ({ database, now }: StoreContext): number => + Math.max( + now(), + Number(database.prepare("SELECT coalesce(max(updated_at), 0) + 1 AS at FROM mail_sort_rules").get()?.at), + ) + +const takeOut = (context: StoreContext, rule: SortRule, undone: boolean) => { + const at = stampOf(context) + context.database + .prepare("UPDATE mail_sort_rules SET removed_at = ?, updated_at = ?, undone_at = ? WHERE id = ?") + .run(at, at, undone ? at : null, rule.id) + const removed = ruleById(context.database, rule.id) + clearRuleTypes(context.database, removed) + undoEffects(context, rule.id) + return removed +} + +const ownerOnly = (by: Decider, what: string) => { + if (by !== "owner") fail(`only the owner ${what}`, "mail-sort.owner-only") +} + +const addressesOf = (database: CacheDatabase, sender: string): string[] => { + if (sender.includes("@") && !sender.includes(":")) return [sender.trim().toLowerCase()] + const bot = sender.startsWith(SENDER_BOT_PREFIX) ? Number(sender.slice(SENDER_BOT_PREFIX.length)) : undefined + const person = sender.startsWith("person:") ? Number(sender.slice("person:".length)) : undefined + if (bot === undefined && person === undefined) + return fail(`${sender} names no sender: give an address, a person: or a sender-bot: ref`, "mail-sort.sender-ref") + return database + .prepare( + "SELECT lower(i.external_id) AS address FROM identities i WHERE i.provider = 'email' AND i.id IN " + + (bot === undefined + ? "(SELECT identity_id FROM identity_links WHERE person_id = ?)" + : "(SELECT identity_id FROM sender_bot_identities WHERE bot_id = ?)"), + ) + .all(bot ?? person ?? 0) + .map((row) => String(row.address)) +} + +export const mailSortingOver = (context: StoreContext): MailSorting => { + const { database } = context + return { + rules: async (options = {}) => + database + .prepare( + `SELECT ${COLUMNS} FROM mail_sort_rules WHERE removed_at IS ${options.removed ? "NOT NULL" : "NULL"}` + + (options.scope === undefined ? "" : " AND scope = ?") + + " ORDER BY updated_at DESC, id DESC", + ) + .all(...(options.scope === undefined ? [] : [options.scope])) + .map(ruleOf), + scopes: async (email) => + read(database, () => { + const row = database.prepare(`${MAIL_ROWS} AND e.id = ?`).get(email) + if (row === undefined) + throw new CliError("not_found", `no incoming email ${email}`, { reason: "mail-sort.email" }) + const mail = mailRowOf(row) + const domain = mail.from === null ? undefined : sortValueOf("domain", mail.from) + const choices: Omit[] = [ + { scope: "mail", value: String(mail.id) }, + ...(mail.list === null ? [] : [{ scope: "list" as const, value: mail.list }]), + ...(mail.from === null ? [] : [{ scope: "address" as const, value: mail.from }]), + ...(domain === undefined ? [] : [{ scope: "domain" as const, value: domain }]), + ] + return choices.map((choice) => ({ + ...choice, + label: labelOf(choice.scope, choice.value), + freeMail: choice.scope === "domain" && isSharedMailDomain(choice.value), + })) + }), + add: async (input, by, options = {}) => + write(database, () => { + const rule = checked(database, input, by) + const at = stampOf(context) + const preview = previewOf(database, rule, at) + if (options.dryRun) return { applied: false, preview } + if (preview.freeMail && options.confirm !== preview.confirm) + fail( + `${rule.value} is a free-mail domain: the rule would sort ${preview.addresses} addresses and ` + + `${preview.emails} emails together. Run it with dryRun first and pass its confirm`, + "mail-sort.confirm", + ) + const id = Number( + database + .prepare( + "INSERT INTO mail_sort_rules (scope, value, mail_type, sender, organization_id, over_addresses, past, " + + "author, decided_by, reason, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id", + ) + .get( + rule.scope, + rule.value, + rule.mailType, + rule.sender, + rule.organization, + rule.overAddresses ? 1 : 0, + rule.past ? 1 : 0, + rule.author, + rule.decidedBy, + rule.reason, + at, + at, + )?.id, + ) + const made = ruleById(database, id) + applyRule(context, made) + return { applied: true, preview, rule: made } + }), + remove: async (id, by) => + write(database, () => { + const rule = ruleById(database, id) + if (by !== "owner" && (rule.author !== "program" || rule.decidedBy !== by.bot)) + fail("a program removes only the rules it made", "mail-sort.owner-only") + if (rule.removedAt !== null) return rule + return takeOut(context, rule, false) + }), + undo: async (by) => + write(database, () => { + ownerOnly(by, "undoes a sorting change") + const row = database + .prepare( + `SELECT ${COLUMNS} FROM mail_sort_rules WHERE author = 'owner' AND undone_at IS NULL ` + + "ORDER BY updated_at DESC, id DESC LIMIT 1", + ) + .get() + if (row === undefined) return null + const rule = ruleOf(row) + if (rule.removedAt === null) return { undid: "add" as const, rule: takeOut(context, rule, true) } + // Back as it was added: its add is the next change an undo takes back. + database + .prepare("UPDATE mail_sort_rules SET removed_at = NULL, updated_at = created_at WHERE id = ?") + .run(rule.id) + const back = ruleById(database, rule.id) + applyRule(context, back) + return { undid: "remove" as const, rule: back } + }), + reset: async (sender, by) => + write(database, () => { + ownerOnly(by, "resets the manual sorting of a sender") + const addresses = addressesOf(database, sender) + const mails = database + .prepare( + "SELECT id FROM emails WHERE lower(from_address) IN (SELECT value FROM json_each(?)) AND outgoing IS NOT 1", + ) + .all(JSON.stringify(addresses)) + .map((row) => String(row.id)) + return database + .prepare( + `SELECT ${COLUMNS} FROM mail_sort_rules WHERE removed_at IS NULL AND author = 'owner' AND ` + + "((scope = 'address' AND value IN (SELECT value FROM json_each(?))) OR " + + "(scope = 'mail' AND value IN (SELECT value FROM json_each(?)))) ORDER BY id DESC", + ) + .all(JSON.stringify(addresses), JSON.stringify(mails)) + .map((row) => takeOut(context, ruleOf(row), false)) + }), + } +} + +/** The senders of mail just saved in these threads, settled by the rules that move or file senders. */ +export const settleThreads = (context: StoreContext, threads: readonly number[]): void => { + if (threads.length === 0 || !hasSenderRules(context.database)) return + const identities = context.database + .prepare( + "SELECT DISTINCT from_identity_id AS identity FROM emails WHERE from_identity_id IS NOT NULL " + + "AND outgoing IS NOT 1 AND email_thread_id IN (SELECT value FROM json_each(?))", + ) + .all(JSON.stringify(threads)) + .map((row) => Number(row.identity)) + if (identities.length > 0) settleSenders(context, identities) +} diff --git a/src/store/sqlite/manifest.ts b/src/store/sqlite/manifest.ts index 33e5b7090..c63c90238 100644 --- a/src/store/sqlite/manifest.ts +++ b/src/store/sqlite/manifest.ts @@ -274,6 +274,8 @@ export const MANIFEST: ManifestEntry[] = [ { name: "20261125111118_version-75-bot-identities-moved", version: 75, minCompatible: 73 }, { name: "20261125183530_version-76-mail-types", version: 76, minCompatible: 73 }, { name: "20261125183555_version-76-mail-type-triggers", version: 76, minCompatible: 73 }, + { name: "20261125205013_version-77-mail-sort-rules", version: 77, minCompatible: 73 }, + { name: "20261125205014_version-77-mail-sort-triggers", version: 77, minCompatible: 73 }, ] export const generatedMigrations = ( diff --git a/src/store/sqlite/migrations.generated.ts b/src/store/sqlite/migrations.generated.ts index 55068f90e..06c0431ef 100644 --- a/src/store/sqlite/migrations.generated.ts +++ b/src/store/sqlite/migrations.generated.ts @@ -2170,5 +2170,25 @@ export const GENERATED: { name: string; statements: string[] }[] = [ "CREATE TRIGGER mail_type_organization_ad AFTER DELETE ON organization_identities BEGIN\n UPDATE emails SET mail_type = NULL, reach = NULL, type_signal = NULL WHERE mail_type IS NOT NULL AND from_identity_id = OLD.identity_id;\nEND;", "CREATE TRIGGER mail_type_sector_au AFTER UPDATE OF metadata, deleted_at ON organizations\nWHEN json_extract(OLD.metadata, '$.sector') IS NOT json_extract(NEW.metadata, '$.sector') OR OLD.deleted_at IS NOT NEW.deleted_at BEGIN\n UPDATE emails SET mail_type = NULL, reach = NULL, type_signal = NULL WHERE mail_type IS NOT NULL AND from_identity_id IN (SELECT identity_id FROM organization_identities WHERE organization_id = NEW.id);\nEND;" ] + }, + { + "name": "20261125205013_version-77-mail-sort-rules", + "statements": [ + "CREATE TABLE `mail_sort_effects` (\n\t`id` integer PRIMARY KEY AUTOINCREMENT,\n\t`rule_id` integer NOT NULL,\n\t`identity_id` integer NOT NULL,\n\t`action` text NOT NULL,\n\t`before` text,\n\t`after` text,\n\t`created_at` integer NOT NULL,\n\t`undone_at` integer\n);", + "CREATE TABLE `mail_sort_rules` (\n\t`id` integer PRIMARY KEY AUTOINCREMENT,\n\t`scope` text NOT NULL,\n\t`value` text NOT NULL,\n\t`mail_type` text,\n\t`sender` text,\n\t`organization_id` integer,\n\t`over_addresses` integer NOT NULL,\n\t`past` integer NOT NULL,\n\t`author` text NOT NULL,\n\t`decided_by` text,\n\t`reason` text,\n\t`created_at` integer NOT NULL,\n\t`updated_at` integer NOT NULL,\n\t`removed_at` integer,\n\t`undone_at` integer\n);", + "ALTER TABLE `emails` ADD `sort_checked` integer;", + "CREATE INDEX `emails_sort_to_check` ON `emails` (`id`) WHERE mail_type IS NOT NULL AND sort_checked IS NULL;", + "CREATE INDEX `mail_sort_effects_by_rule_id` ON `mail_sort_effects` (`rule_id`);", + "CREATE INDEX `mail_sort_effects_by_identity_id` ON `mail_sort_effects` (`identity_id`);", + "CREATE INDEX `mail_sort_rules_by_scope_value` ON `mail_sort_rules` (`scope`,`value`);" + ] + }, + { + "name": "20261125205014_version-77-mail-sort-triggers", + "statements": [ + "UPDATE emails SET sort_checked = 1 WHERE mail_type IS NOT NULL;", + "CREATE TRIGGER mail_sort_checked_au AFTER UPDATE OF mail_type ON emails\nWHEN NEW.mail_type IS NULL AND NEW.sort_checked IS NOT NULL BEGIN\n UPDATE emails SET sort_checked = NULL WHERE id = NEW.id;\nEND;", + "CREATE TRIGGER mail_sort_effects_identity_ad AFTER DELETE ON identities BEGIN\n DELETE FROM mail_sort_effects WHERE identity_id = OLD.id;\nEND;" + ] } ] diff --git a/src/store/sqlite/schema.ts b/src/store/sqlite/schema.ts index 640df772d..09e3e1a2b 100644 --- a/src/store/sqlite/schema.ts +++ b/src/store/sqlite/schema.ts @@ -863,6 +863,7 @@ export const emails = sqliteTable( mailType: text("mail_type"), reach: text("reach"), typeSignal: text("type_signal"), + sortChecked: integer("sort_checked"), }, (table) => [ unique().on(table.accountId, table.externalId), @@ -870,6 +871,7 @@ export const emails = sqliteTable( index("emails_by_mail_rule_id").on(table.mailRuleId).where(sql`mail_rule_id IS NOT NULL`), index("emails_by_mail_type").on(table.mailType), index("emails_type_to_work_out").on(table.id).where(sql`mail_type IS NULL`), + index("emails_sort_to_check").on(table.id).where(sql`mail_type IS NOT NULL AND sort_checked IS NULL`), index("emails_by_list_id").on( sql`coalesce(json_extract(headers, '$."list-id"'), json_extract(metadata, '$.listId'))`, ), @@ -904,6 +906,8 @@ export const mailRules = sqliteTable( ], ) +export { mailSortEffects, mailSortRules } from "./schema/mail-sorting.js" + export const emailRecipients = sqliteTable( "email_recipients", { diff --git a/src/store/sqlite/schema/mail-sorting.ts b/src/store/sqlite/schema/mail-sorting.ts new file mode 100644 index 000000000..48768ef6d --- /dev/null +++ b/src/store/sqlite/schema/mail-sorting.ts @@ -0,0 +1,41 @@ +import { index, integer, sqliteTable, text } from "../drizzle/core.js" + +export const mailSortRules = sqliteTable( + "mail_sort_rules", + { + id: integer("id").primaryKey({ autoIncrement: true }), + scope: text("scope").notNull(), + value: text("value").notNull(), + mailType: text("mail_type"), + sender: text("sender"), + organizationId: integer("organization_id"), + overAddresses: integer("over_addresses").notNull(), + past: integer("past").notNull(), + author: text("author").notNull(), + decidedBy: text("decided_by"), + reason: text("reason"), + createdAt: integer("created_at").notNull(), + updatedAt: integer("updated_at").notNull(), + removedAt: integer("removed_at"), + undoneAt: integer("undone_at"), + }, + (table) => [index("mail_sort_rules_by_scope_value").on(table.scope, table.value)], +) + +export const mailSortEffects = sqliteTable( + "mail_sort_effects", + { + id: integer("id").primaryKey({ autoIncrement: true }), + ruleId: integer("rule_id").notNull(), + identityId: integer("identity_id").notNull(), + action: text("action").notNull(), + before: text("before"), + after: text("after"), + createdAt: integer("created_at").notNull(), + undoneAt: integer("undone_at"), + }, + (table) => [ + index("mail_sort_effects_by_rule_id").on(table.ruleId), + index("mail_sort_effects_by_identity_id").on(table.identityId), + ], +) diff --git a/src/store/version-77.test.ts b/src/store/version-77.test.ts new file mode 100644 index 000000000..ebeac5a90 --- /dev/null +++ b/src/store/version-77.test.ts @@ -0,0 +1,56 @@ +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 { openCache } from "./open.js" +import { type AccountKey, openStore } from "./store.js" + +const MAIL: AccountKey = { provider: "email", account: "me@acme.example.com" } +const NOW = Date.parse("2026-11-25T12:00:00Z") + +const handles: { close(): unknown }[] = [] +afterEach(async () => { + for (const handle of handles.splice(0)) await handle.close() +}) + +it("keeps a version 76 store's types as checked, and sorts them by the first rule set after the upgrade", async () => { + const path = join(mkdtempSync(join(tmpdir(), "version-77-")), "store.db") + const store = await openStore({ path }) + const accountId = await store.accounts.saveAccount(MAIL, { name: null }) + await store.mail.saveThreads( + Array.from({ length: 30 }, (_, n) => ({ + accountId, + externalId: `t${n}`, + now: NOW, + emails: [ + { + externalId: ``, + subject: `Note ${n}`, + from: { address: `friend${n % 3}@friends.example.com`, name: null }, + to: [{ address: MAIL.account, name: null }], + sentAt: NOW - n * 60_000, + receivedAt: NOW - n * 60_000, + bodyText: null, + }, + ], + })), + ) + await store.close() + const old = await openCache(path) + rollBackTo(old, 77) + old.prepare("UPDATE emails SET mail_type = 'personal', reach = 'direct', type_signal = 'person'").run() + old.close() + + const upgraded = await openStore({ path }) + handles.push(upgraded) + const after = await openCache(path) + handles.push(after) + expect(after.prepare("SELECT count(*) AS n FROM emails WHERE sort_checked = 1").get()?.n).toBe(30) + const { rule } = await upgraded.mail.sorting.add( + { scope: "domain", value: "friends.example.com", mailType: "newsletter", applyTo: "all" }, + "owner", + ) + expect(await upgraded.mail.emails({ types: ["newsletter"] })).toHaveLength(30) + expect(after.prepare("SELECT DISTINCT type_signal AS s FROM emails").all()).toEqual([{ s: `rule:${rule?.id}` }]) +}) diff --git a/src/testing/older-store.ts b/src/testing/older-store.ts index 4cd6cdc5c..d45d3a4bc 100644 --- a/src/testing/older-store.ts +++ b/src/testing/older-store.ts @@ -3,6 +3,10 @@ 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 = { + 77: + "DROP TRIGGER mail_sort_checked_au; DROP TRIGGER mail_sort_effects_identity_ad; " + + "DROP INDEX emails_sort_to_check; ALTER TABLE emails DROP COLUMN sort_checked; " + + "DROP TABLE mail_sort_effects; DROP TABLE mail_sort_rules;", 76: "DROP TRIGGER mail_type_email_au; DROP TRIGGER mail_type_outgoing_au; DROP TRIGGER mail_type_list_ai; " + "DROP TRIGGER mail_type_recipient_ai; DROP TRIGGER mail_type_recipient_ad; " + From 449d750fd88b9abc105598574bd08c4d7ffb4174 Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 25 Nov 2026 22:23:27 +0100 Subject: [PATCH 2/2] perf(mail): settle a rule's senders 100 per write Moving 500 senders in one write held the lock 4-6 s, past the 5 s another writer waits. The rule and its type clears stay one write; the moves follow in writes of 100, and a sender already settled is skipped. Co-Authored-By: Claude Opus 5.5 --- src/store/sqlite/mail-sorting.ts | 48 +++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/src/store/sqlite/mail-sorting.ts b/src/store/sqlite/mail-sorting.ts index 5d0d90902..3a0e19f9b 100644 --- a/src/store/sqlite/mail-sorting.ts +++ b/src/store/sqlite/mail-sorting.ts @@ -513,11 +513,11 @@ const ruleById = (database: CacheDatabase, id: number): SortRule => { return ruleOf(row) } -/** Applies a rule just made live: its mail is typed again, and the senders it names settle. */ -const applyRule = (context: StoreContext, rule: SortRule) => { +/** Makes a rule live: its mail is typed again. Answers the senders it names, for `settleInChunks`. */ +const applyRule = (context: StoreContext, rule: SortRule): number[] => { const { database } = context clearRuleTypes(database, rule) - if (rule.sender === null && rule.organization === null) return + if (rule.sender === null && rule.organization === null) return [] const identities = [ ...new Set( inScope(database, rule.scope, rule.value).flatMap((row) => (row.identity === null ? [] : [row.identity])), @@ -536,7 +536,16 @@ const applyRule = (context: StoreContext, rule: SortRule) => { at: context.now(), }) } - settleSenders(context, identities) + return identities +} + +/** Each move takes about 10 ms: 100 per write keeps another writer's 5 s wait for the lock far away. */ +const SETTLE_CHUNK = 100 + +/** Settles senders a write at a time; a sender already settled is skipped, so a stopped run resumes on the next. */ +const settleInChunks = (context: StoreContext, identities: readonly number[]) => { + for (let at = 0; at < identities.length; at += SETTLE_CHUNK) + write(context.database, () => settleSenders(context, identities.slice(at, at + SETTLE_CHUNK))) } /** A change's time, later than every change before it, so undo takes changes back in order within one millisecond. */ @@ -609,12 +618,12 @@ export const mailSortingOver = (context: StoreContext): MailSorting => { freeMail: choice.scope === "domain" && isSharedMailDomain(choice.value), })) }), - add: async (input, by, options = {}) => - write(database, () => { + add: async (input, by, options = {}) => { + const { identities, ...result } = write(database, () => { const rule = checked(database, input, by) const at = stampOf(context) const preview = previewOf(database, rule, at) - if (options.dryRun) return { applied: false, preview } + if (options.dryRun) return { applied: false, preview, identities: [] } if (preview.freeMail && options.confirm !== preview.confirm) fail( `${rule.value} is a free-mail domain: the rule would sort ${preview.addresses} addresses and ` + @@ -643,9 +652,11 @@ export const mailSortingOver = (context: StoreContext): MailSorting => { )?.id, ) const made = ruleById(database, id) - applyRule(context, made) - return { applied: true, preview, rule: made } - }), + return { applied: true, preview, rule: made, identities: applyRule(context, made) } + }) + settleInChunks(context, identities) + return result + }, remove: async (id, by) => write(database, () => { const rule = ruleById(database, id) @@ -654,8 +665,8 @@ export const mailSortingOver = (context: StoreContext): MailSorting => { if (rule.removedAt !== null) return rule return takeOut(context, rule, false) }), - undo: async (by) => - write(database, () => { + undo: async (by) => { + const { identities, undone } = write(database, () => { ownerOnly(by, "undoes a sorting change") const row = database .prepare( @@ -663,17 +674,20 @@ export const mailSortingOver = (context: StoreContext): MailSorting => { "ORDER BY updated_at DESC, id DESC LIMIT 1", ) .get() - if (row === undefined) return null + if (row === undefined) return { identities: [], undone: null } const rule = ruleOf(row) - if (rule.removedAt === null) return { undid: "add" as const, rule: takeOut(context, rule, true) } + if (rule.removedAt === null) + return { identities: [], undone: { undid: "add" as const, rule: takeOut(context, rule, true) } } // Back as it was added: its add is the next change an undo takes back. database .prepare("UPDATE mail_sort_rules SET removed_at = NULL, updated_at = created_at WHERE id = ?") .run(rule.id) const back = ruleById(database, rule.id) - applyRule(context, back) - return { undid: "remove" as const, rule: back } - }), + return { identities: applyRule(context, back), undone: { undid: "remove" as const, rule: back } } + }) + settleInChunks(context, identities) + return undone + }, reset: async (sender, by) => write(database, () => { ownerOnly(by, "resets the manual sorting of a sender")