diff --git a/api/store.api.txt b/api/store.api.txt index c53fa86b9..868f975dd 100644 --- a/api/store.api.txt +++ b/api/store.api.txt @@ -416,6 +416,15 @@ PeopleStore · interface · similar(name: string, options?: { PeopleStore · interface · limit?: number; PeopleStore · interface · }): Promise; PeopleStore · interface · ties(people: readonly string[]): Promise>; +PeopleStore · interface · moveToBot(subject: string | IdentityRef, by: Decider, options?: { +PeopleStore · interface · bot?: string; +PeopleStore · interface · name?: string; +PeopleStore · interface · reason?: string; +PeopleStore · interface · }): Promise; +PeopleStore · interface · moveToPerson(subject: string | IdentityRef, by: Decider, options?: { +PeopleStore · interface · person?: string; +PeopleStore · interface · reason?: string; +PeopleStore · interface · }): Promise; PeopleStore · interface · } PersonFacts · interface · export interface PersonFacts { PersonFacts · interface · id: Id; diff --git a/biome.json b/biome.json index f36abb0ee..d4c00279d 100644 --- a/biome.json +++ b/biome.json @@ -772,7 +772,7 @@ "noExcessiveLinesPerFile": { "level": "error", "options": { - "maxLines": 1890 + "maxLines": 1893 } } } @@ -780,7 +780,12 @@ } }, { - "includes": ["src/crm/cli/index.ts", "src/store/sqlite/emails.ts", "src/store/sqlite/notes.ts"], + "includes": [ + "src/crm/cli/index.ts", + "src/errors/reasons.ts", + "src/store/sqlite/emails.ts", + "src/store/sqlite/notes.ts" + ], "linter": { "rules": { "style": { @@ -817,7 +822,7 @@ "noExcessiveLinesPerFile": { "level": "error", "options": { - "maxLines": 3255 + "maxLines": 3260 } } } diff --git a/changes/feat-bots-entity.md b/changes/feat-bots-entity.md new file mode 100644 index 000000000..d8ac6e6dd --- /dev/null +++ b/changes/feat-bots-entity.md @@ -0,0 +1,20 @@ +### Added + +- **Sender bots, apart from people (store version 74).** A program that writes to the owner becomes a `sender_bots` + row. That covers a no-reply or alert address, a messenger bot, and a service's signed automatic mail. A bot is never + proposed as the same person and never offered by `people.similar`. It has no ties, and `tasks.assign` refuses it + with `sender-bot.assignee`. The owner's `store.people.moveToBot` and `moveToPerson` move a person, a bot or one + identity for its whole history. The owner's choice wins over the rules, and every move is logged in + `sender_bot_moves`. See [ARCHITECTURE.md, "Sender bots"](../docs/dev/ARCHITECTURE.md) and + [schema.md](../docs/storage/schema.md#sender_bots). +- **A page of people reads its List-Ids through an index** (`emails_by_list_id`). It no longer reads the List-Id of + every stored email. + +### Changed — experimental + +- **`people.list` rows have `bot`**: `sender-bot:` for a sender bot, else `null`. A bot is still listed as + `automated` under its `person:` ref, so `people list kind:automated` and `people show` keep working. A bot's + `ties` are empty. +- **`KindSignal` gains `owner-choice`**: the signal of a bot the owner made when nothing else marks it. +- **`KIND_RULES` goes to 7.** The first list after the upgrade works out every kind again and moves the programs it + finds. diff --git a/docs/dev/ARCHITECTURE.md b/docs/dev/ARCHITECTURE.md index e218d3a8e..fafef5783 100644 --- a/docs/dev/ARCHITECTURE.md +++ b/docs/dev/ARCHITECTURE.md @@ -690,7 +690,23 @@ proposes them instead. A no-reply address (`isNoReplyAddress`) is no one's: it n more than `SMALL_GROUP_MEMBERS` recipients; else `direct`. The owner missing from a To or Cc that names others says nothing, since an alias the store does not know looks the same. The reach most of their mail had wins, the wider on a tie; mail the owner wrote them or a private chat both wrote in makes it `direct`, and with no mail a one-to-one chat - or a small group does. `null` when nothing says. The page reads every stored email's List-Id once for this. + or a small group does. `null` when nothing says. The page reads the List-Ids of its people's mail, and the senders of + those lists through the index `emails_by_list_id` (version 74). +- **Sender bots** (`sender-bots.ts`, version 74): a program that writes to the owner is a `sender_bots` row, not a + person. A bot keeps the person row it was sorted from: its identities stay linked there, so ingest, merges, purges and + `people show person:` work as before, and `people.list` lists it as `automated` under that ref with + `bot: "sender-bot:"` and no ties. Kept kinds move a person to a bot by rule when their kind is `automated` by a + program's signal (`PROGRAM_SIGNALS`: the platform's bot flag, a no-reply or notification address, a signed + `Auto-Submitted`, an empty Return-Path, `bulk_never_replied`), the owner wrote them nothing (no mail tie, no private + chat both wrote in; the platform's flag holds against both), no `ALWAYS_SHOWN` reason holds, and every identity of + theirs is the program's, or they have one. A name or a bulk mailbox alone marks a person `automated` and moves + nothing: a newsletter a human writes stays a person. A rule's bot goes back to a person when those rules stop holding. + The owner's `moveToBot` and `moveToPerson` move a person, a bot or one identity (one of several gets a person row of + its own first) for its whole history, and win over the rules and every `KIND_RULES` bump: a bot the owner made has + `author = 'owner'`, and an identity whose latest move is the owner's to a person is never moved by a rule. Every move + is a `sender_bot_moves` row. A bot is never joined to anyone by the matcher (`identity.not-a-person`), never assigned a + task (`sender-bot.assignee`), never offered by `people.similar` and has no ties in `people.ties`. Neither table has a + foreign key, so an older build erasing a person or purging an account still can; triggers drop their rows. `people.similar` serves a form that adds a person: names starting like the typed words, the same `variantKey` first; a `name:` search looks for the typed text in both scripts (`spellings`). Each row's `usernameSource` names the messenger its `@username` belongs to. diff --git a/docs/dev/COORDINATION.md b/docs/dev/COORDINATION.md index 8a2e625c8..6c5f5677c 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 74.** 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 75.** 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/reasons.md b/docs/reasons.md index 001f3306c..9b064edb8 100644 --- a/docs/reasons.md +++ b/docs/reasons.md @@ -241,7 +241,7 @@ headings. | `identity.not-shared` | `validation_error` | only a match on a shared mailbox can say the mailbox is a company's | | | `identity.nothing-left` | `validation_error` | a split leaves at least one identity with the person | | | `identity.owner` | `validation_error` | one side is the owner's person, and only the owner joins anyone to themselves | | -| `identity.owner-only` | `permission_error` | only the owner undoes a merge, splits a person, confirms or undoes a link, or links an identity to themselves | | +| `identity.owner-only` | `permission_error` | only the owner undoes or confirms a merge, a split or a link, links an identity to themselves, or moves a sender | | | `identity.rejected` | `conflict` | the owner rejected linking these people on this evidence; only a new signal or identity proposes them again | | | `identity.same` | `validation_error` | the two identities are one person already | | | `identity.separated` | `conflict` | the owner separated this identity from that person; only the owner links it again | | @@ -515,6 +515,10 @@ headings. | `selection.changed` | `validation_error` | the stored selection changed meanwhile | | | `selection.invalid` | `validation_error` | the selection is not valid | | | `selection.out-of-scope` | `permission_error` | the selection reaches outside what this profile may read | | +| `sender-bot.assignee` | `validation_error` | a sender bot is no one's assignee; move it to a person first | | +| `sender-bot.not-a-person` | `validation_error` | the person named is a sender bot; name a person | | +| `sender-bot.not-found` | `not_found` | no sender bot has that id; people list kind:automated lists them | | +| `sender-bot.owner` | `validation_error` | the owner's own person is never a bot | | | `serve.outdated` | `configuration_error` | the store or the installed version is newer than this serve; it stopped so its unit starts the installed one | | | `session.duplicate` | `conflict` | another profile here already signs in to this account as this user | | | `session.missing` | `authentication_error` | this profile is not signed in: no saved sign-in or API token | | diff --git a/docs/storage/schema.md b/docs/storage/schema.md index b368997d3..5ac123acc 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. -145 tables, 28 full-text indexes. +147 tables, 28 full-text indexes. ## Conventions @@ -333,6 +333,39 @@ An AI agent or a script that works here: it registers itself, owns projects and *Checks:* `CHECK ("metadata" IS NULL OR json_valid("metadata"))` +### `sender_bots` + +A program that writes to the owner: a no-reply or alert address, a messenger bot, a service's mail. Not a person, so it is never proposed as the same person, has no ties and is no task's assignee. Its identities are those of the person row it was sorted from, which `people list` shows as `automated`. Not the `bots` table, which holds agents that work here. + +| Column | Type | Constraints | References | Meaning | +|---|---|---|---|---| +| `id` | integer | PK | | | +| `person_id` | integer | not null, unique | | the person row whose identities are this bot's; its `person:` uid stays the bot's handle in lists. No foreign key: an older build erasing the person does not know this table, and a trigger drops the bot with it | +| `name` | text | | | the owner's name for it; null shows its identities' name | +| `organization_id` | integer | | | the organization it sends for; no foreign key, a trigger clears it when the organization row goes | +| `author` | text | not null | | `rules` or `owner`: the owner's bot never goes back by a rule | +| `reason` | text | | | what sorted it: the kind signals, such as `no-reply`, or the owner's words | +| `created_at` | integer | not null | | when this row was saved here | +| `updated_at` | integer | not null | | when this row last changed here | + +### `sender_bot_moves` + +Every move of an identity between a person and a sender bot, by the rules or by the owner. An identity whose latest move is the owner's is never moved by a rule again. A trigger drops an identity's rows with it. + +| Column | Type | Constraints | References | Meaning | +|---|---|---|---|---| +| `id` | integer | PK | | | +| `identity_id` | integer | not null | | no foreign key: an older build purging an account does not know this table | +| `from_person_id` | integer | | | the person it left, or null | +| `from_bot_id` | integer | | | the sender bot it left, or null | +| `to_person_id` | integer | | | the person it went to, or null | +| `to_bot_id` | integer | | | the sender bot it went to, or null | +| `author` | text | not null | | `rules` or `owner` | +| `reason` | text | | | the kind signals of a rule's move, or the owner's words | +| `created_at` | integer | not null | | when it moved | + +*Keys and indexes:* `INDEX (identity_id)` + ## Chats and messages What messengers bring. @@ -765,7 +798,7 @@ One email. | `deleted_at` | integer | | | gone at the source; sync never hard-deletes | | `mail_rule_id` | integer | | | the `mail_rules` row that decided how this email is stored; no constraint, removing the rule clears it | -*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 (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 (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"))` diff --git a/drizzle/20261125025700_version-74-sender-bots/migration.sql b/drizzle/20261125025700_version-74-sender-bots/migration.sql new file mode 100644 index 000000000..9d633cfa7 --- /dev/null +++ b/drizzle/20261125025700_version-74-sender-bots/migration.sql @@ -0,0 +1,25 @@ +CREATE TABLE `sender_bot_moves` ( + `id` integer PRIMARY KEY AUTOINCREMENT, + `identity_id` integer NOT NULL, + `from_person_id` integer, + `from_bot_id` integer, + `to_person_id` integer, + `to_bot_id` integer, + `author` text NOT NULL, + `reason` text, + `created_at` integer NOT NULL +); +--> statement-breakpoint +CREATE TABLE `sender_bots` ( + `id` integer PRIMARY KEY AUTOINCREMENT, + `person_id` integer NOT NULL UNIQUE, + `name` text, + `organization_id` integer, + `author` text NOT NULL, + `reason` text, + `created_at` integer NOT NULL, + `updated_at` integer NOT NULL +); +--> statement-breakpoint +CREATE INDEX `emails_by_list_id` ON `emails` (coalesce(json_extract(headers, '$."list-id"'), json_extract(metadata, '$.listId')));--> statement-breakpoint +CREATE INDEX `sender_bot_moves_by_identity_id` ON `sender_bot_moves` (`identity_id`); \ No newline at end of file diff --git a/drizzle/20261125025700_version-74-sender-bots/snapshot.json b/drizzle/20261125025700_version-74-sender-bots/snapshot.json new file mode 100644 index 000000000..d4eea08e6 --- /dev/null +++ b/drizzle/20261125025700_version-74-sender-bots/snapshot.json @@ -0,0 +1,26544 @@ +{ + "version": "7", + "dialect": "sqlite", + "id": "2b07ed8a-b642-415b-a443-0dd1d3304475", + "prevIds": [ + "ca9fb6f2-be10-4e33-8089-c8a42ea87d5c" + ], + "ddl": [ + { + "name": "account_identities", + "entityType": "tables" + }, + { + "name": "accounts", + "entityType": "tables" + }, + { + "name": "agent_actions", + "entityType": "tables" + }, + { + "name": "aliases", + "entityType": "tables" + }, + { + "name": "attachments", + "entityType": "tables" + }, + { + "name": "bot_updates", + "entityType": "tables" + }, + { + "name": "bots", + "entityType": "tables" + }, + { + "name": "calendar_entries", + "entityType": "tables" + }, + { + "name": "calendar_entry_participants", + "entityType": "tables" + }, + { + "name": "calendar_entry_revisions", + "entityType": "tables" + }, + { + "name": "calendars", + "entityType": "tables" + }, + { + "name": "canonical_auto_tag_claims", + "entityType": "tables" + }, + { + "name": "canonical_tags", + "entityType": "tables" + }, + { + "name": "catalog_items", + "entityType": "tables" + }, + { + "name": "chat_event_people", + "entityType": "tables" + }, + { + "name": "chat_events", + "entityType": "tables" + }, + { + "name": "chat_members", + "entityType": "tables" + }, + { + "name": "chat_revision_source", + "entityType": "tables" + }, + { + "name": "chat_revisions", + "entityType": "tables" + }, + { + "name": "chats", + "entityType": "tables" + }, + { + "name": "chunk_messages", + "entityType": "tables" + }, + { + "name": "chunks", + "entityType": "tables" + }, + { + "name": "content_authors", + "entityType": "tables" + }, + { + "name": "content_channels", + "entityType": "tables" + }, + { + "name": "content_metrics", + "entityType": "tables" + }, + { + "name": "content_post_revisions", + "entityType": "tables" + }, + { + "name": "content_posts", + "entityType": "tables" + }, + { + "name": "content_terms", + "entityType": "tables" + }, + { + "name": "contracts", + "entityType": "tables" + }, + { + "name": "conversation_messages", + "entityType": "tables" + }, + { + "name": "conversation_readiness", + "entityType": "tables" + }, + { + "name": "conversation_state", + "entityType": "tables" + }, + { + "name": "conversations", + "entityType": "tables" + }, + { + "name": "crm_fields", + "entityType": "tables" + }, + { + "name": "crm_files", + "entityType": "tables" + }, + { + "name": "deals", + "entityType": "tables" + }, + { + "name": "decision_requests", + "entityType": "tables" + }, + { + "name": "decisions", + "entityType": "tables" + }, + { + "name": "document_annotation_transfers", + "entityType": "tables" + }, + { + "name": "document_changes", + "entityType": "tables" + }, + { + "name": "document_index_pending", + "entityType": "tables" + }, + { + "name": "document_revisions", + "entityType": "tables" + }, + { + "name": "documents", + "entityType": "tables" + }, + { + "name": "email_index_pending", + "entityType": "tables" + }, + { + "name": "email_locations", + "entityType": "tables" + }, + { + "name": "email_mailboxes", + "entityType": "tables" + }, + { + "name": "email_recipients", + "entityType": "tables" + }, + { + "name": "email_threads", + "entityType": "tables" + }, + { + "name": "emails", + "entityType": "tables" + }, + { + "name": "embeddings", + "entityType": "tables" + }, + { + "name": "enrichments", + "entityType": "tables" + }, + { + "name": "entity_link_events", + "entityType": "tables" + }, + { + "name": "event_index_pending", + "entityType": "tables" + }, + { + "name": "event_series", + "entityType": "tables" + }, + { + "name": "events", + "entityType": "tables" + }, + { + "name": "fact_removals", + "entityType": "tables" + }, + { + "name": "facts", + "entityType": "tables" + }, + { + "name": "fetch_leases", + "entityType": "tables" + }, + { + "name": "files", + "entityType": "tables" + }, + { + "name": "financial_accounts", + "entityType": "tables" + }, + { + "name": "financial_transactions", + "entityType": "tables" + }, + { + "name": "identities", + "entityType": "tables" + }, + { + "name": "identity_link_events", + "entityType": "tables" + }, + { + "name": "identity_links", + "entityType": "tables" + }, + { + "name": "identity_revisions", + "entityType": "tables" + }, + { + "name": "invoice_lines", + "entityType": "tables" + }, + { + "name": "invoices", + "entityType": "tables" + }, + { + "name": "involvement_pending", + "entityType": "tables" + }, + { + "name": "involvements", + "entityType": "tables" + }, + { + "name": "leads", + "entityType": "tables" + }, + { + "name": "link_reviews", + "entityType": "tables" + }, + { + "name": "link_revisions", + "entityType": "tables" + }, + { + "name": "links", + "entityType": "tables" + }, + { + "name": "mail_rules", + "entityType": "tables" + }, + { + "name": "mailboxes", + "entityType": "tables" + }, + { + "name": "meeting_chat_messages", + "entityType": "tables" + }, + { + "name": "meeting_index_pending", + "entityType": "tables" + }, + { + "name": "meeting_participants", + "entityType": "tables" + }, + { + "name": "meeting_series", + "entityType": "tables" + }, + { + "name": "meeting_summaries", + "entityType": "tables" + }, + { + "name": "meeting_transcript_rows", + "entityType": "tables" + }, + { + "name": "meeting_transcripts", + "entityType": "tables" + }, + { + "name": "meetings", + "entityType": "tables" + }, + { + "name": "member_counts", + "entityType": "tables" + }, + { + "name": "member_observation_members", + "entityType": "tables" + }, + { + "name": "member_observations", + "entityType": "tables" + }, + { + "name": "member_stays", + "entityType": "tables" + }, + { + "name": "memories", + "entityType": "tables" + }, + { + "name": "memory_index_pending", + "entityType": "tables" + }, + { + "name": "mention_pending", + "entityType": "tables" + }, + { + "name": "mentions", + "entityType": "tables" + }, + { + "name": "message_counter_observations", + "entityType": "tables" + }, + { + "name": "message_links", + "entityType": "tables" + }, + { + "name": "message_reactions", + "entityType": "tables" + }, + { + "name": "message_revisions", + "entityType": "tables" + }, + { + "name": "message_stems_pending", + "entityType": "tables" + }, + { + "name": "message_transcripts", + "entityType": "tables" + }, + { + "name": "messages", + "entityType": "tables" + }, + { + "name": "note_index_pending", + "entityType": "tables" + }, + { + "name": "note_revisions", + "entityType": "tables" + }, + { + "name": "notes", + "entityType": "tables" + }, + { + "name": "order_lines", + "entityType": "tables" + }, + { + "name": "orders", + "entityType": "tables" + }, + { + "name": "organization_identities", + "entityType": "tables" + }, + { + "name": "organizations", + "entityType": "tables" + }, + { + "name": "payment_allocations", + "entityType": "tables" + }, + { + "name": "payments", + "entityType": "tables" + }, + { + "name": "persons", + "entityType": "tables" + }, + { + "name": "pipeline_stage_changes", + "entityType": "tables" + }, + { + "name": "pipeline_stages", + "entityType": "tables" + }, + { + "name": "pipelines", + "entityType": "tables" + }, + { + "name": "places", + "entityType": "tables" + }, + { + "name": "poll_votes", + "entityType": "tables" + }, + { + "name": "projects", + "entityType": "tables" + }, + { + "name": "proposed_actions", + "entityType": "tables" + }, + { + "name": "record_relations", + "entityType": "tables" + }, + { + "name": "records", + "entityType": "tables" + }, + { + "name": "reminders", + "entityType": "tables" + }, + { + "name": "search_index_state", + "entityType": "tables" + }, + { + "name": "searches", + "entityType": "tables" + }, + { + "name": "sender_bot_moves", + "entityType": "tables" + }, + { + "name": "sender_bots", + "entityType": "tables" + }, + { + "name": "store_settings", + "entityType": "tables" + }, + { + "name": "subscription_prices", + "entityType": "tables" + }, + { + "name": "subscriptions", + "entityType": "tables" + }, + { + "name": "sync_cursors", + "entityType": "tables" + }, + { + "name": "sync_ranges", + "entityType": "tables" + }, + { + "name": "syncs", + "entityType": "tables" + }, + { + "name": "tag_consolidations", + "entityType": "tables" + }, + { + "name": "tag_redirects", + "entityType": "tables" + }, + { + "name": "taggings", + "entityType": "tables" + }, + { + "name": "task_assignments", + "entityType": "tables" + }, + { + "name": "task_events", + "entityType": "tables" + }, + { + "name": "task_index_pending", + "entityType": "tables" + }, + { + "name": "task_key_counters", + "entityType": "tables" + }, + { + "name": "task_pairs", + "entityType": "tables" + }, + { + "name": "tasks", + "entityType": "tables" + }, + { + "name": "templates", + "entityType": "tables" + }, + { + "name": "templates_history", + "entityType": "tables" + }, + { + "name": "tracker_items", + "entityType": "tables" + }, + { + "name": "transaction_splits", + "entityType": "tables" + }, + { + "name": "transcript_index_pending", + "entityType": "tables" + }, + { + "name": "vector_index_redo", + "entityType": "tables" + }, + { + "name": "vector_indexes", + "entityType": "tables" + }, + { + "table": "account_identities", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "last_messaged_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_score", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_signals", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_scored_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_demoted", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "address_book", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "provider", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "settings", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'personal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "actor_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "actor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "tool", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "tier", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "target_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "started_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "finished_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "aliasable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "aliasable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "display", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "attachable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "attachable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "width", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "height", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "duration", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "provider_ref", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "local_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extraction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extractor", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extraction_error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "content_sha256", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extracted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "local_path_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "contact", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "payload", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "received_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "handled_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "replayed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "owner_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "token_digest", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "last_seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "disabled_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "calendar_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "series_entry_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "event_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "event_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "ical_uid", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "original_starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "exception", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "all_day", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "start_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "end_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "recurrence_ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "event_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "transparency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "visibility", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "own_response", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "organizer_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "join_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "join_key", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "conference", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "sequence", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "etag", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "series_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "entry_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "email", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "response", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "optional", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "organizer", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "self", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "resource", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "entry_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "recurrence_ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "access_role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "primary_calendar", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "synced", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "tag_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "algorithm", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "score", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "fields", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'tag'", + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "sku", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "supplier_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "supplier_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "unit", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "unit_price", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "archived_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_event_people", + "name": "chat_event_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_event_people", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "source_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "action", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "actor_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "happened_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_members", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_members", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_members", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revision_source", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revision_source", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revision_source", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "field", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "old_value", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "new_value", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "source", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "unread_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "last_message_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "participants_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "username", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "membership_state", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "searchable", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "message_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "members_tracked_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "details_fetched_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "parent_chat_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "scope", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "muted", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "muted_until", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "archived", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "marked_unread", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "unread_counted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "title_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "chunk_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "first_message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "last_message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "text_start", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "text_end", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "chunkable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "chunkable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "start_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "end_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "scope", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "occurred_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "email", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "network", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "handle", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "post_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "views", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "reactions", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "comments", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "shares", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "clicks", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "raw", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "post_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "version", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "reason", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "channel_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "title_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "published_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "scheduled_for", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "source_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "version", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "normalized_text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "slug", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "parent_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "tag_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "number", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "signed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "effective_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "expiration_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "auto_renew", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "renewal_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "renewal_unit", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "notice_days", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "terms", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "value", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "deal_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_messages", + "name": "conversation_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_messages", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "new_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "edited_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "deleted_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "chunks", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "embedded_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "current", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "stale", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "counted_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "chat_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "enabled_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "built_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "algorithm_version", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "current_build", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "first_message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "build", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "first_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "last_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "message_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "built_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "algorithm_version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "code", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "label", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "multiple", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "filterable", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "options", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "owner_kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "owner_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "owner_assignee", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "local_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "content_sha256", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "extraction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "extraction_error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "downloaded_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "downloaded_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "stage_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "amount", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "close_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "closed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "rank", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "token_digest", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "proposal_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "action", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "batch_digest", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "channel", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "bot_profile", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "chat_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "message_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "owner_user_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "expires_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "used_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "cancelled_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "statement", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "supersedes_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "source_key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "collection", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "snapshot_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "bindings_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "reference_map", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "document_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "path", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "event", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "document_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "front_matter", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "file_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "extension", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "storage", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "local_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "content_hash", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "front_matter", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "extraction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "extraction_error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "language", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "export_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "pinned_file_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "removal", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "mailbox_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "uidvalidity", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "uid", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "email_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_mailboxes", + "name": "email_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_mailboxes", + "name": "mailbox_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_mailboxes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "email_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "address", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "subject", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "last_email_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "emails_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "subject_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "email_thread_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "subject", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "from_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "from_address", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "from_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "sent_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "received_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "in_reply_to", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "references", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "body_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "body_html", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "snippet", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "outgoing", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "read", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "flagged", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "draft", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "headers", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "mail_rule_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "dims", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "vector", + "type": "blob", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "subject_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "subject_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "source_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "provider", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "tokens", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "linkable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "linkable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "entity_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "from_entity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "to_entity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "confidence", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "origin", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "event_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "origin", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "all_day", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "source_deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "fact_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "subject", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "removed_by", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "bot", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "removed_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "statement", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "subject_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "subject_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "occurred_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "supersedes_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "scope", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "anchor", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "holder", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "expires_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "path", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "path_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "parent_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "document_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "content_hash", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "institution", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "number_hint", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "holder_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "holder_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "opening_balance", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "opening_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "closed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "financial_account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "statement_date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "booked_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "counterparty_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "counterparty_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "counterparty_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "reference", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "payment_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "provider", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "username", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "bot", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "phone_hmac", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "email", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "phone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "from_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "to_person_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "person_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "confidence", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "source", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "username", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "marks", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "invoice_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "description", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "quantity", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "unit_price", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "catalog_item_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "number", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "issuer_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "issuer_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "counterparty_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "counterparty_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "total", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "issue_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "due_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "contract_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "subscription_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvement_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvement_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "subject_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "subject_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "occurred_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "stage_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "amount", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "close_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "closed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "rank", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "deal_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "linkable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "linkable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "entity_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "candidates", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "reason", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "chosen_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "decided_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "link_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "change", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "before", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "after", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "author", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "from_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "from_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "to_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "to_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "anchor", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "target_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "target_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "evidence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "confirmed", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "author", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "purpose", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "conditions", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "actions", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "protected", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "decided_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "sent_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "sender_participant_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "sender_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "recipient", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "display_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "email", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "joined_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "left_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "duration_ms", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "sessions", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "event_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "host_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "join_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "overview", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "sections", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "next_steps", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "content", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "doc_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "start_ms", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "end_ms", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "speaker_participant_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "speaker_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "format", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "language", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "content_hash", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "superseded_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "meeting_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "event_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "join_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "started_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "ended_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "duration_ms", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "host_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "participants_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "title_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "join_key", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "direction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "client_phone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "reported_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "listed_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "complete_list", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observation_members", + "name": "member_observation_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observation_members", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observation_members", + "name": "member_stay_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "observed_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "started_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "complete", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "reported_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "listed_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "first_seen_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "last_seen_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "joined_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "invited_by_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "left_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "subject_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "subject_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "confidence", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "last_verified_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "supersedes_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memory_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memory_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mention_pending", + "name": "source_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mention_pending", + "name": "source_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "source_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "source_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "source_field", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "start_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "end_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "domain", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "confidence", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "target_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "author", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "counter", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "value", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "parent_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "confidence", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "version", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "batch", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "build", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "stale_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "message_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "own", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "reaction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "reacted_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "edited_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_stems_pending", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "message_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "message_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "heard_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "thread_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sender_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sender_chat_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sender_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sent_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "edited_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "reply_to_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "reply_to", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "forward", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "outgoing", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "reactions", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "normalizer_version", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "mentions", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "thread_root_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "starred", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "delivery", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "note_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "notable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "notable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "author_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "author_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "order_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "description", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "quantity", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "unit_price", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "catalog_item_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "customer_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "customer_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "purpose", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "supplier_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "supplier_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "supplier_name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "number", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "total", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "order_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "fulfilled_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "invoice_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "payment_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "source_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "contract_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "deal_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'purchase'", + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "organization_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'personal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "payment_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "invoice_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payer_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payer_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payee_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payee_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payment_date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "reference", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "refund_of", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "subscription_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "owner", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "name_order", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "messages_from", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "task_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "last_contact", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "item_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "item_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "from_stage_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "to_stage_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "changed_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "pipeline_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "outcome", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'open'", + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "base_stage_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "base_confirmed", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'deal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "address", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "message_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "answers", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "voted_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'personal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "owner_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "owner_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "tasks_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "target_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "payload", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "proposed_by_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "proposed_by_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "decided_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "decided_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "executed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "result", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "verdict", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "record_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "target_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "target_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "amount", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "as_role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "fields", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "revision", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "entity_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "entity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "projected_fingerprint", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "batch_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "created_entity", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "task_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "due_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "timezone", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "state", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "lease_until", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "receipt", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "watermark", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "filled_through", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "terms_through", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "normalizer_version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "built_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "analyzer", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "command", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "params", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "language", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "fields_version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "last_run_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "runs", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "from_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "from_bot_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "to_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "to_bot_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "person_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "store_settings", + "name": "key", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "store_settings", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "store_settings", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "subscription_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "effective_from", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "supplier_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "supplier_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "customer_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "customer_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "catalog_item_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "contract_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "interval_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "interval_unit", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "start_date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "trial_end_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "next_renewal_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "cancelled_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "end_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "from_key", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "to_key", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "started_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "finished_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "counts", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "source_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "survivor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "source_member_ids", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "survivor_member_ids", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "actor_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "actor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "idempotency_key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "vocabulary_fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "preview_fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "counts", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "request_fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_redirects", + "name": "source_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_redirects", + "name": "survivor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_redirects", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "tag_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "taggable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "taggable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "main", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "author_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "author_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "task_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "assignee_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "assignee_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "task_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "actor_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "actor_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "changes", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_key_counters", + "name": "prefix", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_key_counters", + "name": "tasks_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "task_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "source_locator", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "other_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "score", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "band", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "levels", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "reasons", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decision", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decided_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decided_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "project_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "number", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "priority", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "parent_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "due_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "started_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "closed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "closed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "closed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "package_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_locator", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_group", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "resolution", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "verdict", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "next_check_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "title_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_reason_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "category", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "claimed_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "claimed_until", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_certainty", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_as", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_certainty", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "priority_score", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "agent", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "provider", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "channel", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "language", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "updated_by", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "channel", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "language", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "saved_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "saved_by", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "replaced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "parent_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "title_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "normalized_text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "source_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "archived_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "transaction_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "category", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "category_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "note", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transcript_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transcript_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_index_redo", + "name": "chunk_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "dims", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "ready", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "filled_through", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "account_identities_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "account_identities", + "name": "account_identities_in_address_book", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "address_book = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "accounts", + "name": "accounts_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "agent_actions", + "name": "agent_actions_by_started_at_desc", + "columns": [ + { + "value": "\"started_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "agent_actions", + "name": "agent_actions_by_actor_type_actor_id", + "columns": [ + { + "value": "actor_type", + "isExpression": false + }, + { + "value": "actor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "agent_actions", + "name": "agent_actions_by_target_type_target_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_displayed", + "columns": [ + { + "value": "aliasable_type", + "isExpression": false + }, + { + "value": "aliasable_id", + "isExpression": false + }, + { + "value": "ifnull(\"account_id\", 0)", + "isExpression": true + } + ], + "isUnique": true, + "where": "display = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_by_aliasable_type_aliasable_id_name_folded", + "columns": [ + { + "value": "aliasable_type", + "isExpression": false + }, + { + "value": "aliasable_id", + "isExpression": false + }, + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NULL AND aliasable_type = 'project' OR account_id IS NULL AND aliasable_type = 'tag'", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_by_aliasable_type_aliasable_id", + "columns": [ + { + "value": "aliasable_type", + "isExpression": false + }, + { + "value": "aliasable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "attachments", + "name": "attachments_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "attachments", + "name": "attachments_local_path_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "local_path IS NOT NULL AND local_path_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "bot_updates", + "name": "bot_updates_by_account_id_received_at_desc", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"received_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "bots", + "name": "bots_by_owner_person_id", + "columns": [ + { + "value": "owner_person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_calendar_id_starts_at", + "columns": [ + { + "value": "calendar_id", + "isExpression": false + }, + { + "value": "starts_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_ical_uid", + "columns": [ + { + "value": "ical_uid", + "isExpression": false + } + ], + "isUnique": false, + "where": "ical_uid IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_join_key", + "columns": [ + { + "value": "join_key", + "isExpression": false + } + ], + "isUnique": false, + "where": "join_key IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_calendar_id_series_external_id", + "columns": [ + { + "value": "calendar_id", + "isExpression": false + }, + { + "value": "series_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "series_external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_event_id", + "columns": [ + { + "value": "event_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_event_series_id", + "columns": [ + { + "value": "event_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_event_type_event_id", + "columns": [ + { + "value": "event_type", + "isExpression": false + }, + { + "value": "event_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_organizer_identity_id", + "columns": [ + { + "value": "organizer_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entry_participants", + "name": "calendar_entry_participants_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entry_revisions", + "name": "calendar_entry_revisions_by_entry_id_created_at", + "columns": [ + { + "value": "entry_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "canonical_auto_tag_claims", + "name": "canonical_auto_tag_claims_by_tag_id", + "columns": [ + { + "value": "tag_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_supplier_type_supplier_id_sku", + "columns": [ + { + "value": "supplier_type", + "isExpression": false + }, + { + "value": "supplier_id", + "isExpression": false + }, + { + "value": "sku", + "isExpression": false + } + ], + "isUnique": true, + "where": "supplier_id IS NOT NULL AND sku IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_sku", + "columns": [ + { + "value": "sku", + "isExpression": false + } + ], + "isUnique": true, + "where": "supplier_id IS NULL AND sku IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_event_people", + "name": "chat_event_people_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_events", + "name": "chat_events_by_chat_id_happened_at", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "happened_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_events", + "name": "chat_events_by_actor_identity_id", + "columns": [ + { + "value": "actor_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_members", + "name": "chat_members_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_revisions", + "name": "chat_revisions_by_chat_id_created_at", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_revisions", + "name": "chat_revisions_by_account_id_old_value", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "old_value", + "isExpression": false + } + ], + "isUnique": false, + "where": "field = 'external_id'", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chats", + "name": "chats_by_recency", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"last_message_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chats", + "name": "chats_title_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "title IS NOT NULL AND title_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chats", + "name": "chats_by_parent_chat_id", + "columns": [ + { + "value": "parent_chat_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunk_messages", + "name": "chunk_messages_by_first_message_id", + "columns": [ + { + "value": "first_message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunk_messages", + "name": "chunk_messages_by_last_message_id", + "columns": [ + { + "value": "last_message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_content_hash", + "columns": [ + { + "value": "content_hash", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_scope_occurred_at", + "columns": [ + { + "value": "scope", + "isExpression": false + }, + { + "value": "occurred_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_metrics", + "name": "content_metrics_by_post_id_at", + "columns": [ + { + "value": "post_id", + "isExpression": false + }, + { + "value": "at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_post_revisions", + "name": "content_post_revisions_by_post_id_created_at", + "columns": [ + { + "value": "post_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_posts", + "name": "content_posts_by_account_id_status", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "status", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_posts", + "name": "content_posts_by_account_id_published_at", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "published_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_terms", + "name": "content_terms_by_tag_id", + "columns": [ + { + "value": "tag_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_deal_id", + "columns": [ + { + "value": "deal_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversation_messages", + "name": "conversation_messages_by_message_id", + "columns": [ + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversation_readiness", + "name": "conversation_readiness_by_model", + "columns": [ + { + "value": "model", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversations", + "name": "conversations_by_chat", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "build", + "isExpression": false + }, + { + "value": "first_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversations", + "name": "conversations_by_first_message_id", + "columns": [ + { + "value": "first_message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "crm_files", + "name": "crm_files_by_account_id_owner_kind_owner_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "owner_kind", + "isExpression": false + }, + { + "value": "owner_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_account_id_external_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL AND external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_stage_id", + "columns": [ + { + "value": "stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decision_requests", + "name": "decision_requests_by_channel_bot_profile_chat_id_message_id", + "columns": [ + { + "value": "channel", + "isExpression": false + }, + { + "value": "bot_profile", + "isExpression": false + }, + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decisions", + "name": "decisions_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decisions", + "name": "decisions_by_supersedes_id", + "columns": [ + { + "value": "supersedes_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decisions", + "name": "decisions_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "document_changes", + "name": "document_changes_by_account_id_at", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "document_revisions", + "name": "document_revisions_by_document_id", + "columns": [ + { + "value": "document_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_locations", + "name": "email_locations_by_email_id", + "columns": [ + { + "value": "email_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_mailboxes", + "name": "email_mailboxes_by_mailbox_id", + "columns": [ + { + "value": "mailbox_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_recipients", + "name": "email_recipients_by_email_id", + "columns": [ + { + "value": "email_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_recipients", + "name": "email_recipients_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_threads", + "name": "email_threads_subject_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "subject IS NOT NULL AND subject_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_time", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"sent_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_mail_rule_id", + "columns": [ + { + "value": "mail_rule_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "mail_rule_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_list_id", + "columns": [ + { + "value": "coalesce(json_extract(headers, '$.\"list-id\"'), json_extract(metadata, '$.listId'))", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_email_thread_id", + "columns": [ + { + "value": "email_thread_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_from_identity_id", + "columns": [ + { + "value": "from_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "entity_link_events", + "name": "entity_link_events_by_linkable_type_linkable_id", + "columns": [ + { + "value": "linkable_type", + "isExpression": false + }, + { + "value": "linkable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "entity_link_events", + "name": "entity_link_events_by_entity_type_to_entity_id", + "columns": [ + { + "value": "entity_type", + "isExpression": false + }, + { + "value": "to_entity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "events", + "name": "events_by_time", + "columns": [ + { + "value": "starts_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "events", + "name": "events_by_event_series_id", + "columns": [ + { + "value": "event_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "fact_removals", + "name": "fact_removals_by_removed_at", + "columns": [ + { + "value": "removed_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_subject_type_subject_id", + "columns": [ + { + "value": "subject_type", + "isExpression": false + }, + { + "value": "subject_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_supersedes_id", + "columns": [ + { + "value": "supersedes_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_by_account_id_path_folded", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "path_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_path_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "path_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_by_parent_id", + "columns": [ + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_by_document_id", + "columns": [ + { + "value": "document_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_by_holder_type_holder_id", + "columns": [ + { + "value": "holder_type", + "isExpression": false + }, + { + "value": "holder_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_financial_account_id_booked_date", + "columns": [ + { + "value": "financial_account_id", + "isExpression": false + }, + { + "value": "booked_date", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_payment_id", + "columns": [ + { + "value": "payment_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "payment_id IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_counterparty_type_counterparty_id", + "columns": [ + { + "value": "counterparty_type", + "isExpression": false + }, + { + "value": "counterparty_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identities", + "name": "identities_by_email", + "columns": [ + { + "value": "email", + "isExpression": false + } + ], + "isUnique": false, + "where": "email IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identities", + "name": "identities_name_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "name IS NOT NULL AND name_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_by_from_person_id", + "columns": [ + { + "value": "from_person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_by_to_person_id", + "columns": [ + { + "value": "to_person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_links", + "name": "identity_links_by_person_id", + "columns": [ + { + "value": "person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_revisions", + "name": "identity_revisions_by_identity", + "columns": [ + { + "value": "identity_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_by_catalog_item_id", + "columns": [ + { + "value": "catalog_item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_issuer_type_issuer_id", + "columns": [ + { + "value": "issuer_type", + "isExpression": false + }, + { + "value": "issuer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_counterparty_type_counterparty_id", + "columns": [ + { + "value": "counterparty_type", + "isExpression": false + }, + { + "value": "counterparty_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_contract_id", + "columns": [ + { + "value": "contract_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_subscription_id", + "columns": [ + { + "value": "subscription_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_person", + "columns": [ + { + "value": "person_id", + "isExpression": false + }, + { + "value": "\"occurred_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_identity", + "columns": [ + { + "value": "identity_id", + "isExpression": false + }, + { + "value": "\"occurred_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_subject_type_subject_id", + "columns": [ + { + "value": "subject_type", + "isExpression": false + }, + { + "value": "subject_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_account_id_external_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL AND external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_stage_id", + "columns": [ + { + "value": "stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_deal_id", + "columns": [ + { + "value": "deal_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "link_reviews", + "name": "link_reviews_by_status_created_at", + "columns": [ + { + "value": "status", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "link_revisions", + "name": "link_revisions_by_link_id_created_at", + "columns": [ + { + "value": "link_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_unresolved", + "columns": [ + { + "value": "target_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": "to_id IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_relationship_key", + "columns": [ + { + "value": "kind", + "isExpression": false + }, + { + "value": "from_type", + "isExpression": false + }, + { + "value": "from_id", + "isExpression": false + }, + { + "value": "to_type", + "isExpression": false + }, + { + "value": "to_id", + "isExpression": false + }, + { + "value": "ifnull(\"anchor\", '')", + "isExpression": true + }, + { + "value": "ifnull(\"role\", '')", + "isExpression": true + }, + { + "value": "ifnull(\"account_id\", 0)", + "isExpression": true + } + ], + "isUnique": true, + "where": "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'partner-of') AND to_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_by_from_type_from_id", + "columns": [ + { + "value": "from_type", + "isExpression": false + }, + { + "value": "from_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_by_to_type_to_id", + "columns": [ + { + "value": "to_type", + "isExpression": false + }, + { + "value": "to_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mailboxes", + "name": "mailboxes_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mailboxes", + "name": "mailboxes_name_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "name_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_by_meeting_id_external_id", + "columns": [ + { + "value": "meeting_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_by_meeting_id", + "columns": [ + { + "value": "meeting_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_by_sender_participant_id", + "columns": [ + { + "value": "sender_participant_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_series", + "name": "meeting_series_by_event_series_id", + "columns": [ + { + "value": "event_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_series", + "name": "meeting_series_by_host_identity_id", + "columns": [ + { + "value": "host_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_rows_by_speaker_participant_id", + "columns": [ + { + "value": "speaker_participant_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_transcripts", + "name": "meeting_transcripts_by_meeting_id", + "columns": [ + { + "value": "meeting_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_join_key", + "columns": [ + { + "value": "join_key", + "isExpression": false + } + ], + "isUnique": false, + "where": "join_key IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_join_key_to_fill", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "join_url IS NOT NULL AND join_key IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_time", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"started_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_account_id_title_folded", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "title_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_title_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "title IS NOT NULL AND title_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_meeting_series_id", + "columns": [ + { + "value": "meeting_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_event_id", + "columns": [ + { + "value": "event_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_host_identity_id", + "columns": [ + { + "value": "host_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_observation_members", + "name": "member_observation_members_by_member_stay_id", + "columns": [ + { + "value": "member_stay_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_observation_members", + "name": "member_observation_members_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_observations", + "name": "member_observations_by_chat_id_observed_at_id", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "observed_at", + "isExpression": false + }, + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_stays", + "name": "member_stays_open", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "left_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_stays", + "name": "member_stays_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_stays", + "name": "member_stays_by_invited_by_identity_id", + "columns": [ + { + "value": "invited_by_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_subject_type_subject_id", + "columns": [ + { + "value": "subject_type", + "isExpression": false + }, + { + "value": "subject_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_supersedes_id", + "columns": [ + { + "value": "supersedes_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_kind_value", + "columns": [ + { + "value": "kind", + "isExpression": false + }, + { + "value": "value", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_domain", + "columns": [ + { + "value": "domain", + "isExpression": false + } + ], + "isUnique": false, + "where": "domain IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_status_kind", + "columns": [ + { + "value": "status", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_target_type_target_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "target_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_links", + "name": "message_links_unique", + "columns": [ + { + "value": "message_id", + "isExpression": false + }, + { + "value": "ifnull(\"parent_id\", 0)", + "isExpression": true + }, + { + "value": "source", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + }, + { + "value": "ifnull(\"build\", 0)", + "isExpression": true + } + ], + "isUnique": true, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_links", + "name": "message_links_by_build", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "build", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_links", + "name": "message_links_by_parent_id", + "columns": [ + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_reactions", + "name": "message_reactions_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_revisions", + "name": "message_revisions_by_message_id", + "columns": [ + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_transcripts", + "name": "message_transcripts_by_message_id", + "columns": [ + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_time", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "\"sent_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_starred_by_time", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "\"sent_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": "starred = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_reply", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "reply_to_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "reply_to_external_id IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_account", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_to_normalize", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "normalized_text IS NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_chat_id_thread_external_id", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "thread_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "thread_root_id IS NULL AND thread_external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_sender_identity_id", + "columns": [ + { + "value": "sender_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_thread_root_id", + "columns": [ + { + "value": "thread_root_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "note_revisions", + "name": "note_revisions_by_note_id", + "columns": [ + { + "value": "note_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "notes", + "name": "notes_by_notable_type_notable_id", + "columns": [ + { + "value": "notable_type", + "isExpression": false + }, + { + "value": "notable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "notes", + "name": "notes_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "order_lines", + "name": "order_lines_by_catalog_item_id", + "columns": [ + { + "value": "catalog_item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_customer_type_customer_id", + "columns": [ + { + "value": "customer_type", + "isExpression": false + }, + { + "value": "customer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_supplier_type_supplier_id", + "columns": [ + { + "value": "supplier_type", + "isExpression": false + }, + { + "value": "supplier_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_invoice_id", + "columns": [ + { + "value": "invoice_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_payment_id", + "columns": [ + { + "value": "payment_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_contract_id", + "columns": [ + { + "value": "contract_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_deal_id", + "columns": [ + { + "value": "deal_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "organization_identities", + "name": "organization_identities_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_by_invoice_id", + "columns": [ + { + "value": "invoice_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_payer_type_payer_id", + "columns": [ + { + "value": "payer_type", + "isExpression": false + }, + { + "value": "payer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_payee_type_payee_id", + "columns": [ + { + "value": "payee_type", + "isExpression": false + }, + { + "value": "payee_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_refund_of", + "columns": [ + { + "value": "refund_of", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_subscription_id", + "columns": [ + { + "value": "subscription_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "persons", + "name": "persons_by_kind", + "columns": [ + { + "value": "kind", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "persons", + "name": "persons_kind_to_work_out", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "kind IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_item_type_item_id", + "columns": [ + { + "value": "item_type", + "isExpression": false + }, + { + "value": "item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_pipeline_id", + "columns": [ + { + "value": "pipeline_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_from_stage_id", + "columns": [ + { + "value": "from_stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_to_stage_id", + "columns": [ + { + "value": "to_stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_by_pipeline_id_external_id", + "columns": [ + { + "value": "pipeline_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_by_pipeline_id_position", + "columns": [ + { + "value": "pipeline_id", + "isExpression": false + }, + { + "value": "position", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_by_base_stage_id", + "columns": [ + { + "value": "base_stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipelines", + "name": "pipelines_by_account_id_kind_external_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL AND external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipelines", + "name": "pipelines_by_name_folded_kind", + "columns": [ + { + "value": "name_folded", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "poll_votes", + "name": "poll_votes_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_name_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "name_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_owner_type_owner_id", + "columns": [ + { + "value": "owner_type", + "isExpression": false + }, + { + "value": "owner_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_status_created_at", + "columns": [ + { + "value": "status", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_target_type_target_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_proposed_by_type_proposed_by_id", + "columns": [ + { + "value": "proposed_by_type", + "isExpression": false + }, + { + "value": "proposed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_decided_by_type_decided_by_id", + "columns": [ + { + "value": "decided_by_type", + "isExpression": false + }, + { + "value": "decided_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "record_relations", + "name": "record_relations_by_target_type_target_external_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "record_relations", + "name": "record_relations_by_target_id", + "columns": [ + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "records", + "name": "records_by_account_id_batch_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "batch_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "records", + "name": "records_by_entity_type_entity_id", + "columns": [ + { + "value": "entity_type", + "isExpression": false + }, + { + "value": "entity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "reminders", + "name": "reminders_due", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "state", + "isExpression": false + }, + { + "value": "due_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "reminders", + "name": "reminders_by_task_id", + "columns": [ + { + "value": "task_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "searches", + "name": "searches_history", + "columns": [ + { + "value": "command", + "isExpression": false + }, + { + "value": "params", + "isExpression": false + } + ], + "isUnique": true, + "where": "name IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "searches", + "name": "searches_by_last_run", + "columns": [ + { + "value": "\"last_run_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "sender_bot_moves", + "name": "sender_bot_moves_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_by_subscription_id_effective_from", + "columns": [ + { + "value": "subscription_id", + "isExpression": false + }, + { + "value": "effective_from", + "isExpression": false + } + ], + "isUnique": true, + "where": "review <> 'rejected'", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_supplier_type_supplier_id", + "columns": [ + { + "value": "supplier_type", + "isExpression": false + }, + { + "value": "supplier_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_customer_type_customer_id", + "columns": [ + { + "value": "customer_type", + "isExpression": false + }, + { + "value": "customer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_catalog_item_id", + "columns": [ + { + "value": "catalog_item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_contract_id", + "columns": [ + { + "value": "contract_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "syncs", + "name": "syncs_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_by_source_id", + "columns": [ + { + "value": "source_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_by_survivor_id", + "columns": [ + { + "value": "survivor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_by_actor_type_actor_id", + "columns": [ + { + "value": "actor_type", + "isExpression": false + }, + { + "value": "actor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_redirects", + "name": "tag_redirects_by_survivor_id", + "columns": [ + { + "value": "survivor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "taggings", + "name": "taggings_main_topic", + "columns": [ + { + "value": "taggable_type", + "isExpression": false + }, + { + "value": "taggable_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "main = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "taggings", + "name": "taggings_by_taggable_type_taggable_id", + "columns": [ + { + "value": "taggable_type", + "isExpression": false + }, + { + "value": "taggable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "taggings", + "name": "taggings_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_assignments", + "name": "task_assignments_by_assignee_type_assignee_id", + "columns": [ + { + "value": "assignee_type", + "isExpression": false + }, + { + "value": "assignee_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_events", + "name": "task_events_by_task_id", + "columns": [ + { + "value": "task_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_events", + "name": "task_events_by_actor_type_actor_id", + "columns": [ + { + "value": "actor_type", + "isExpression": false + }, + { + "value": "actor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_pairs", + "name": "task_pairs_by_decision_created_at", + "columns": [ + { + "value": "decision", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_pairs", + "name": "task_pairs_by_other_id", + "columns": [ + { + "value": "other_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_pairs", + "name": "task_pairs_by_decided_by_type_decided_by_id", + "columns": [ + { + "value": "decided_by_type", + "isExpression": false + }, + { + "value": "decided_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_title_folded", + "columns": [ + { + "value": "title_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_close_reason_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "close_reason IS NOT NULL AND close_reason_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_status", + "columns": [ + { + "value": "project_id", + "isExpression": false + }, + { + "value": "status", + "isExpression": false + }, + { + "value": "due_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_project_id_status_next_check_at", + "columns": [ + { + "value": "project_id", + "isExpression": false + }, + { + "value": "status", + "isExpression": false + }, + { + "value": "next_check_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_project_id_source_locator", + "columns": [ + { + "value": "project_id", + "isExpression": false + }, + { + "value": "source_locator", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_source_group", + "columns": [ + { + "value": "source_group", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_provider_external_id", + "columns": [ + { + "value": "provider", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_parent_id", + "columns": [ + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_closed_by_type_closed_by_id", + "columns": [ + { + "value": "closed_by_type", + "isExpression": false + }, + { + "value": "closed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_close_suggested_by_type_close_suggested_by_id", + "columns": [ + { + "value": "close_suggested_by_type", + "isExpression": false + }, + { + "value": "close_suggested_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "templates_history", + "name": "templates_history_by_key_channel_language_id", + "columns": [ + { + "value": "key", + "isExpression": false + }, + { + "value": "channel", + "isExpression": false + }, + { + "value": "language", + "isExpression": false + }, + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tracker_items", + "name": "tracker_items_by_account_id_kind_parent_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + }, + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "transaction_splits", + "name": "transaction_splits_by_category_folded", + "columns": [ + { + "value": "category_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "transaction_splits", + "name": "transaction_splits_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "account_identities", + "name": "fk_account_identities_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "account_identities", + "name": "fk_account_identities_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "accounts", + "name": "fk_accounts_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "aliases", + "name": "fk_aliases_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "bot_updates", + "name": "fk_bot_updates_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "bots", + "name": "fk_bots_owner_person_id_persons_id_fk", + "columns": [ + "owner_person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_calendar_id_calendars_id_fk", + "columns": [ + "calendar_id" + ], + "tableTo": "calendars", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_series_entry_id_calendar_entries_id_fk", + "columns": [ + "series_entry_id" + ], + "tableTo": "calendar_entries", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_event_id_events_id_fk", + "columns": [ + "event_id" + ], + "tableTo": "events", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_event_series_id_event_series_id_fk", + "columns": [ + "event_series_id" + ], + "tableTo": "event_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_organizer_identity_id_identities_id_fk", + "columns": [ + "organizer_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entry_participants", + "name": "fk_calendar_entry_participants_entry_id_calendar_entries_id_fk", + "columns": [ + "entry_id" + ], + "tableTo": "calendar_entries", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entry_participants", + "name": "fk_calendar_entry_participants_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entry_revisions", + "name": "fk_calendar_entry_revisions_entry_id_calendar_entries_id_fk", + "columns": [ + "entry_id" + ], + "tableTo": "calendar_entries", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendars", + "name": "fk_calendars_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "canonical_auto_tag_claims", + "name": "fk_auto_tag_claims_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "canonical_auto_tag_claims", + "name": "fk_auto_tag_claims_tag_id_tags_id_fk", + "columns": [ + "tag_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_event_people", + "name": "fk_chat_event_people_chat_event_id_chat_events_id_fk", + "columns": [ + "chat_event_id" + ], + "tableTo": "chat_events", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_event_people", + "name": "fk_chat_event_people_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_events", + "name": "fk_chat_events_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_events", + "name": "fk_chat_events_actor_identity_id_identities_id_fk", + "columns": [ + "actor_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_members", + "name": "fk_chat_members_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_members", + "name": "fk_chat_members_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chats", + "name": "fk_chats_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chats", + "name": "fk_chats_parent_chat_id_chats_id_fk", + "columns": [ + "parent_chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunk_messages", + "name": "fk_chunk_messages_chunk_id_chunks_id_fk", + "columns": [ + "chunk_id" + ], + "tableTo": "chunks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunk_messages", + "name": "fk_chunk_messages_first_message_id_messages_id_fk", + "columns": [ + "first_message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunk_messages", + "name": "fk_chunk_messages_last_message_id_messages_id_fk", + "columns": [ + "last_message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunks", + "name": "fk_chunks_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunks", + "name": "fk_chunks_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_authors", + "name": "fk_content_authors_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_channels", + "name": "fk_content_channels_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_metrics", + "name": "fk_content_metrics_post_id_content_posts_id_fk", + "columns": [ + "post_id" + ], + "tableTo": "content_posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_post_revisions", + "name": "fk_content_post_revisions_post_id_content_posts_id_fk", + "columns": [ + "post_id" + ], + "tableTo": "content_posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_posts", + "name": "fk_content_posts_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_terms", + "name": "fk_content_terms_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_terms", + "name": "fk_content_terms_tag_id_canonical_tags_id_fk", + "columns": [ + "tag_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "contracts", + "name": "fk_contracts_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "contracts", + "name": "fk_contracts_deal_id_deals_id_fk", + "columns": [ + "deal_id" + ], + "tableTo": "deals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_messages", + "name": "fk_conversation_messages_conversation_id_conversations_id_fk", + "columns": [ + "conversation_id" + ], + "tableTo": "conversations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_messages", + "name": "fk_conversation_messages_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_readiness", + "name": "fk_conversation_readiness_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_state", + "name": "fk_conversation_state_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversations", + "name": "fk_conversations_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversations", + "name": "fk_conversations_first_message_id_messages_id_fk", + "columns": [ + "first_message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "crm_fields", + "name": "fk_crm_fields_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "crm_files", + "name": "fk_crm_files_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_stage_id_pipeline_stages_id_fk", + "columns": [ + "stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "decisions", + "name": "fk_decisions_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "decisions", + "name": "fk_decisions_supersedes_id_decisions_id_fk", + "columns": [ + "supersedes_id" + ], + "tableTo": "decisions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "document_revisions", + "name": "fk_document_revisions_document_id_documents_id_fk", + "columns": [ + "document_id" + ], + "tableTo": "documents", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "documents", + "name": "fk_documents_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_locations", + "name": "fk_email_locations_mailbox_id_mailboxes_id_fk", + "columns": [ + "mailbox_id" + ], + "tableTo": "mailboxes", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_locations", + "name": "fk_email_locations_email_id_emails_id_fk", + "columns": [ + "email_id" + ], + "tableTo": "emails", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_mailboxes", + "name": "fk_email_mailboxes_email_id_emails_id_fk", + "columns": [ + "email_id" + ], + "tableTo": "emails", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_mailboxes", + "name": "fk_email_mailboxes_mailbox_id_mailboxes_id_fk", + "columns": [ + "mailbox_id" + ], + "tableTo": "mailboxes", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_recipients", + "name": "fk_email_recipients_email_id_emails_id_fk", + "columns": [ + "email_id" + ], + "tableTo": "emails", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_recipients", + "name": "fk_email_recipients_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_threads", + "name": "fk_email_threads_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "emails", + "name": "fk_emails_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "emails", + "name": "fk_emails_email_thread_id_email_threads_id_fk", + "columns": [ + "email_thread_id" + ], + "tableTo": "email_threads", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "emails", + "name": "fk_emails_from_identity_id_identities_id_fk", + "columns": [ + "from_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "events", + "name": "fk_events_event_series_id_event_series_id_fk", + "columns": [ + "event_series_id" + ], + "tableTo": "event_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "facts", + "name": "fk_facts_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "facts", + "name": "fk_facts_supersedes_id_facts_id_fk", + "columns": [ + "supersedes_id" + ], + "tableTo": "facts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "fetch_leases", + "name": "fk_fetch_leases_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "files", + "name": "fk_files_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "files", + "name": "fk_files_parent_id_files_id_fk", + "columns": [ + "parent_id" + ], + "tableTo": "files", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "files", + "name": "fk_files_document_id_documents_id_fk", + "columns": [ + "document_id" + ], + "tableTo": "documents", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "financial_transactions", + "name": "fk_financial_transactions_financial_account_id_financial_accounts_id_fk", + "columns": [ + "financial_account_id" + ], + "tableTo": "financial_accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "financial_transactions", + "name": "fk_financial_transactions_payment_id_payments_id_fk", + "columns": [ + "payment_id" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "financial_transactions", + "name": "fk_financial_transactions_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_link_events", + "name": "fk_identity_link_events_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_link_events", + "name": "fk_identity_link_events_from_person_id_persons_id_fk", + "columns": [ + "from_person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_link_events", + "name": "fk_identity_link_events_to_person_id_persons_id_fk", + "columns": [ + "to_person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_links", + "name": "fk_identity_links_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_links", + "name": "fk_identity_links_person_id_persons_id_fk", + "columns": [ + "person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_revisions", + "name": "fk_identity_revisions_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoice_lines", + "name": "fk_invoice_lines_invoice_id_invoices_id_fk", + "columns": [ + "invoice_id" + ], + "tableTo": "invoices", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoice_lines", + "name": "fk_invoice_lines_catalog_item_id_catalog_items_id_fk", + "columns": [ + "catalog_item_id" + ], + "tableTo": "catalog_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoices", + "name": "fk_invoices_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoices", + "name": "fk_invoices_contract_id_contracts_id_fk", + "columns": [ + "contract_id" + ], + "tableTo": "contracts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoices", + "name": "fk_invoices_subscription_id_subscriptions_id_fk", + "columns": [ + "subscription_id" + ], + "tableTo": "subscriptions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_person_id_persons_id_fk", + "columns": [ + "person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_stage_id_pipeline_stages_id_fk", + "columns": [ + "stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_deal_id_deals_id_fk", + "columns": [ + "deal_id" + ], + "tableTo": "deals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "mail_rules", + "name": "fk_mail_rules_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "mailboxes", + "name": "fk_mailboxes_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_chat_messages", + "name": "fk_meeting_chat_messages_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_chat_messages", + "name": "fk_meeting_chat_messages_sender_participant_id_meeting_participants_id_fk", + "columns": [ + "sender_participant_id" + ], + "tableTo": "meeting_participants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_participants", + "name": "fk_meeting_participants_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_participants", + "name": "fk_meeting_participants_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_series", + "name": "fk_meeting_series_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_series", + "name": "fk_meeting_series_event_series_id_event_series_id_fk", + "columns": [ + "event_series_id" + ], + "tableTo": "event_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_series", + "name": "fk_meeting_series_host_identity_id_identities_id_fk", + "columns": [ + "host_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_summaries", + "name": "fk_meeting_summaries_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_transcript_rows", + "name": "fk_meeting_transcript_rows_meeting_transcript_id_meeting_transcripts_id_fk", + "columns": [ + "meeting_transcript_id" + ], + "tableTo": "meeting_transcripts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_transcript_rows", + "name": "fk_meeting_transcript_rows_speaker_participant_id_meeting_participants_id_fk", + "columns": [ + "speaker_participant_id" + ], + "tableTo": "meeting_participants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_transcripts", + "name": "fk_meeting_transcripts_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_meeting_series_id_meeting_series_id_fk", + "columns": [ + "meeting_series_id" + ], + "tableTo": "meeting_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_event_id_events_id_fk", + "columns": [ + "event_id" + ], + "tableTo": "events", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_host_identity_id_identities_id_fk", + "columns": [ + "host_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_counts", + "name": "fk_member_counts_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observation_members", + "name": "fk_member_observation_members_member_observation_id_member_observations_id_fk", + "columns": [ + "member_observation_id" + ], + "tableTo": "member_observations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observation_members", + "name": "fk_member_observation_members_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observation_members", + "name": "fk_member_observation_members_member_stay_id_member_stays_id_fk", + "columns": [ + "member_stay_id" + ], + "tableTo": "member_stays", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observations", + "name": "fk_member_observations_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_stays", + "name": "fk_member_stays_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_stays", + "name": "fk_member_stays_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_stays", + "name": "fk_member_stays_invited_by_identity_id_identities_id_fk", + "columns": [ + "invited_by_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "memories", + "name": "fk_memories_supersedes_id_memories_id_fk", + "columns": [ + "supersedes_id" + ], + "tableTo": "memories", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "memories", + "name": "fk_memories_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_counter_observations", + "name": "fk_message_counter_observations_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_links", + "name": "fk_message_links_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_links", + "name": "fk_message_links_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_links", + "name": "fk_message_links_parent_id_messages_id_fk", + "columns": [ + "parent_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_reactions", + "name": "fk_message_reactions_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_reactions", + "name": "fk_message_reactions_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_revisions", + "name": "fk_message_revisions_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_transcripts", + "name": "fk_message_transcripts_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_transcripts", + "name": "fk_message_transcripts_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_sender_identity_id_identities_id_fk", + "columns": [ + "sender_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_thread_root_id_messages_id_fk", + "columns": [ + "thread_root_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "note_revisions", + "name": "fk_note_revisions_note_id_notes_id_fk", + "columns": [ + "note_id" + ], + "tableTo": "notes", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "order_lines", + "name": "fk_order_lines_order_id_orders_id_fk", + "columns": [ + "order_id" + ], + "tableTo": "orders", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "order_lines", + "name": "fk_order_lines_catalog_item_id_catalog_items_id_fk", + "columns": [ + "catalog_item_id" + ], + "tableTo": "catalog_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_invoice_id_invoices_id_fk", + "columns": [ + "invoice_id" + ], + "tableTo": "invoices", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_payment_id_payments_id_fk", + "columns": [ + "payment_id" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_contract_id_contracts_id_fk", + "columns": [ + "contract_id" + ], + "tableTo": "contracts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_deal_id_deals_id_fk", + "columns": [ + "deal_id" + ], + "tableTo": "deals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "organization_identities", + "name": "fk_organization_identities_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "organization_identities", + "name": "fk_organization_identities_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payment_allocations", + "name": "fk_payment_allocations_payment_id_payments_id_fk", + "columns": [ + "payment_id" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payment_allocations", + "name": "fk_payment_allocations_invoice_id_invoices_id_fk", + "columns": [ + "invoice_id" + ], + "tableTo": "invoices", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payments", + "name": "fk_payments_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payments", + "name": "fk_payments_refund_of_payments_id_fk", + "columns": [ + "refund_of" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payments", + "name": "fk_payments_subscription_id_subscriptions_id_fk", + "columns": [ + "subscription_id" + ], + "tableTo": "subscriptions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stage_changes", + "name": "fk_pipeline_stage_changes_pipeline_id_pipelines_id_fk", + "columns": [ + "pipeline_id" + ], + "tableTo": "pipelines", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stage_changes", + "name": "fk_pipeline_stage_changes_from_stage_id_pipeline_stages_id_fk", + "columns": [ + "from_stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stage_changes", + "name": "fk_pipeline_stage_changes_to_stage_id_pipeline_stages_id_fk", + "columns": [ + "to_stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stages", + "name": "fk_pipeline_stages_pipeline_id_pipelines_id_fk", + "columns": [ + "pipeline_id" + ], + "tableTo": "pipelines", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stages", + "name": "fk_pipeline_stages_base_stage_id_pipeline_stages_id_fk", + "columns": [ + "base_stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipelines", + "name": "fk_pipelines_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "poll_votes", + "name": "fk_poll_votes_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "poll_votes", + "name": "fk_poll_votes_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "projects", + "name": "fk_projects_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "projects", + "name": "fk_projects_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "proposed_actions", + "name": "fk_proposed_actions_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "record_relations", + "name": "fk_record_relations_record_id_records_id_fk", + "columns": [ + "record_id" + ], + "tableTo": "records", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "record_relations", + "name": "fk_record_relations_target_id_records_id_fk", + "columns": [ + "target_id" + ], + "tableTo": "records", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "records", + "name": "fk_records_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "reminders", + "name": "fk_reminders_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "reminders", + "name": "fk_reminders_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscription_prices", + "name": "fk_subscription_prices_subscription_id_subscriptions_id_fk", + "columns": [ + "subscription_id" + ], + "tableTo": "subscriptions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscriptions", + "name": "fk_subscriptions_catalog_item_id_catalog_items_id_fk", + "columns": [ + "catalog_item_id" + ], + "tableTo": "catalog_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscriptions", + "name": "fk_subscriptions_contract_id_contracts_id_fk", + "columns": [ + "contract_id" + ], + "tableTo": "contracts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscriptions", + "name": "fk_subscriptions_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "sync_cursors", + "name": "fk_sync_cursors_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "sync_ranges", + "name": "fk_sync_ranges_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "syncs", + "name": "fk_syncs_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_consolidations", + "name": "fk_tag_consolidations_source_id_canonical_tags_id_fk", + "columns": [ + "source_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_consolidations", + "name": "fk_tag_consolidations_survivor_id_canonical_tags_id_fk", + "columns": [ + "survivor_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_redirects", + "name": "fk_tag_redirects_source_id_canonical_tags_id_fk", + "columns": [ + "source_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_redirects", + "name": "fk_tag_redirects_survivor_id_canonical_tags_id_fk", + "columns": [ + "survivor_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "taggings", + "name": "fk_taggings_tag_id_tags_id_fk", + "columns": [ + "tag_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_assignments", + "name": "fk_task_assignments_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_events", + "name": "fk_task_events_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_pairs", + "name": "fk_task_pairs_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_pairs", + "name": "fk_task_pairs_other_id_tasks_id_fk", + "columns": [ + "other_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tasks", + "name": "fk_tasks_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tasks", + "name": "fk_tasks_parent_id_tasks_id_fk", + "columns": [ + "parent_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tracker_items", + "name": "fk_tracker_items_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "transaction_splits", + "name": "fk_transaction_splits_transaction_id_financial_transactions_id_fk", + "columns": [ + "transaction_id" + ], + "tableTo": "financial_transactions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "transaction_splits", + "name": "fk_transaction_splits_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "account_identities", + "name": "account_identities_pk", + "columns": [ + "account_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "canonical_auto_tag_claims", + "name": "auto_tag_claims_pk", + "columns": [ + "chat_id", + "tag_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_event_people", + "name": "chat_event_people_pk", + "columns": [ + "chat_event_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_members", + "name": "chat_members_pk", + "columns": [ + "chat_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversation_messages", + "name": "conversation_messages_pk", + "columns": [ + "conversation_id", + "message_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversation_readiness", + "name": "conversation_readiness_pk", + "columns": [ + "chat_id", + "model" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_annotation_transfers", + "name": "document_annotation_transfers_pk", + "columns": [ + "source_key", + "collection" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_index_pending", + "name": "document_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_index_pending", + "name": "email_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_locations", + "name": "email_locations_pk", + "columns": [ + "mailbox_id", + "uidvalidity", + "uid" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_mailboxes", + "name": "email_mailboxes_pk", + "columns": [ + "email_id", + "mailbox_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "embeddings", + "name": "embeddings_pk", + "columns": [ + "model", + "content_hash" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "enrichments", + "name": "enrichments_pk", + "columns": [ + "subject_type", + "subject_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "event_index_pending", + "name": "event_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "fetch_leases", + "name": "fetch_leases_pk", + "columns": [ + "chat_id", + "anchor" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "involvement_pending", + "name": "involvement_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_index_pending", + "name": "meeting_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_counts", + "name": "member_counts_pk", + "columns": [ + "chat_id", + "date" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_observation_members", + "name": "member_observation_members_pk", + "columns": [ + "member_observation_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "memory_index_pending", + "name": "memory_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mention_pending", + "name": "mention_pending_pk", + "columns": [ + "source_type", + "source_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_counter_observations", + "name": "message_counter_observations_pk", + "columns": [ + "message_id", + "counter" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "note_index_pending", + "name": "note_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sync_cursors", + "name": "sync_cursors_pk", + "columns": [ + "account_id", + "key" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sync_ranges", + "name": "sync_ranges_pk", + "columns": [ + "chat_id", + "from_key" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "task_index_pending", + "name": "task_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "templates", + "name": "templates_pk", + "columns": [ + "key", + "channel", + "language" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "transcript_index_pending", + "name": "transcript_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "accounts", + "name": "accounts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "agent_actions", + "name": "agent_actions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "aliases", + "name": "aliases_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "attachments", + "name": "attachments_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "bot_updates", + "name": "bot_updates_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "bots", + "name": "bots_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendar_entry_participants", + "name": "calendar_entry_participants_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendar_entry_revisions", + "name": "calendar_entry_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendars", + "name": "calendars_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "canonical_tags", + "name": "tags_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "catalog_items", + "name": "catalog_items_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_events", + "name": "chat_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_revision_source", + "name": "chat_revision_source_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_revisions", + "name": "chat_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chats", + "name": "chats_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chunk_messages", + "name": "chunk_messages_pk", + "columns": [ + "chunk_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chunks", + "name": "chunks_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_authors", + "name": "content_authors_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_channels", + "name": "content_channels_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_metrics", + "name": "content_metrics_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_post_revisions", + "name": "content_post_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_posts", + "name": "content_posts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_terms", + "name": "content_terms_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "contracts", + "name": "contracts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversation_state", + "name": "conversation_state_pk", + "columns": [ + "chat_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversations", + "name": "conversations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "crm_fields", + "name": "crm_fields_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "crm_files", + "name": "crm_files_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "deals", + "name": "deals_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "decision_requests", + "name": "decision_requests_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "decisions", + "name": "decisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_changes", + "name": "document_changes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_revisions", + "name": "document_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "documents", + "name": "documents_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_recipients", + "name": "email_recipients_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_threads", + "name": "email_threads_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "emails", + "name": "emails_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "entity_link_events", + "name": "entity_link_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "event_series", + "name": "event_series_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "events", + "name": "events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "fact_removals", + "name": "fact_removals_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "facts", + "name": "facts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "files", + "name": "files_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identities", + "name": "identities_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identity_links", + "name": "identity_links_pk", + "columns": [ + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identity_revisions", + "name": "identity_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "invoices", + "name": "invoices_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "involvements", + "name": "involvements_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "leads", + "name": "leads_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "link_reviews", + "name": "link_reviews_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "link_revisions", + "name": "link_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "links", + "name": "links_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mail_rules", + "name": "mail_rules_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mailboxes", + "name": "mailboxes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_series", + "name": "meeting_series_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_summaries", + "name": "meeting_summaries_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_rows_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_transcripts", + "name": "meeting_transcripts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meetings", + "name": "meetings_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_observations", + "name": "member_observations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_stays", + "name": "member_stays_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "memories", + "name": "memories_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mentions", + "name": "mentions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_links", + "name": "message_links_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_reactions", + "name": "message_reactions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_revisions", + "name": "message_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_stems_pending", + "name": "message_stems_pending_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_transcripts", + "name": "message_transcripts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "messages", + "name": "messages_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "note_revisions", + "name": "note_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "notes", + "name": "notes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "order_lines", + "name": "order_lines_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "orders", + "name": "orders_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "organization_identities", + "name": "organization_identities_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "organizations", + "name": "organizations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "payments", + "name": "payments_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "persons", + "name": "persons_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "pipelines", + "name": "pipelines_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "places", + "name": "places_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "poll_votes", + "name": "poll_votes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "projects", + "name": "projects_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "record_relations", + "name": "record_relations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "records", + "name": "records_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "reminders", + "name": "reminders_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "search_index_state", + "name": "search_index_state_pk", + "columns": [ + "name" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "searches", + "name": "searches_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sender_bot_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/20261125025709_version-74-sender-bot-triggers/migration.sql b/drizzle/20261125025709_version-74-sender-bot-triggers/migration.sql new file mode 100644 index 000000000..420f7f0ae --- /dev/null +++ b/drizzle/20261125025709_version-74-sender-bot-triggers/migration.sql @@ -0,0 +1,29 @@ +-- No foreign keys on the bot tables, so an older build that erases a person or an organization, or purges an account, +-- still can; these drop or clear their rows with it. +CREATE TRIGGER sender_bots_person_ad AFTER DELETE ON persons BEGIN + DELETE FROM sender_bots WHERE person_id = OLD.id; +END; +--> statement-breakpoint +CREATE TRIGGER sender_bots_organization_ad AFTER DELETE ON organizations BEGIN + UPDATE sender_bots SET organization_id = NULL WHERE organization_id = OLD.id; +END; +--> statement-breakpoint +CREATE TRIGGER sender_bot_moves_identity_ad AFTER DELETE ON identities BEGIN + DELETE FROM sender_bot_moves WHERE identity_id = OLD.id; +END; +--> statement-breakpoint +CREATE TRIGGER person_kind_sender_bot_ai AFTER INSERT ON sender_bots BEGIN + UPDATE persons SET kind = NULL WHERE kind IS NOT NULL AND id = NEW.person_id; +END; +--> statement-breakpoint +CREATE TRIGGER person_kind_sender_bot_ad AFTER DELETE ON sender_bots BEGIN + UPDATE persons SET kind = NULL WHERE kind IS NOT NULL AND id = OLD.person_id; +END; +--> statement-breakpoint +CREATE TRIGGER person_kind_sender_bot_au AFTER UPDATE OF person_id, author, name ON sender_bots BEGIN + UPDATE persons SET kind = NULL WHERE kind IS NOT NULL AND id IN (OLD.person_id, NEW.person_id); +END; +--> statement-breakpoint +CREATE TRIGGER person_kind_sender_bot_move_ai AFTER INSERT ON sender_bot_moves BEGIN + UPDATE persons SET kind = NULL WHERE kind IS NOT NULL AND id IN (SELECT person_id FROM identity_links WHERE identity_id = NEW.identity_id); +END; diff --git a/drizzle/20261125025709_version-74-sender-bot-triggers/snapshot.json b/drizzle/20261125025709_version-74-sender-bot-triggers/snapshot.json new file mode 100644 index 000000000..bddd2bfa9 --- /dev/null +++ b/drizzle/20261125025709_version-74-sender-bot-triggers/snapshot.json @@ -0,0 +1,26544 @@ +{ + "id": "e442fdb3-c8b6-4253-bd3e-0c53da259ba2", + "prevIds": [ + "2b07ed8a-b642-415b-a443-0dd1d3304475" + ], + "version": "7", + "dialect": "sqlite", + "ddl": [ + { + "name": "account_identities", + "entityType": "tables" + }, + { + "name": "accounts", + "entityType": "tables" + }, + { + "name": "agent_actions", + "entityType": "tables" + }, + { + "name": "aliases", + "entityType": "tables" + }, + { + "name": "attachments", + "entityType": "tables" + }, + { + "name": "bot_updates", + "entityType": "tables" + }, + { + "name": "bots", + "entityType": "tables" + }, + { + "name": "calendar_entries", + "entityType": "tables" + }, + { + "name": "calendar_entry_participants", + "entityType": "tables" + }, + { + "name": "calendar_entry_revisions", + "entityType": "tables" + }, + { + "name": "calendars", + "entityType": "tables" + }, + { + "name": "canonical_auto_tag_claims", + "entityType": "tables" + }, + { + "name": "canonical_tags", + "entityType": "tables" + }, + { + "name": "catalog_items", + "entityType": "tables" + }, + { + "name": "chat_event_people", + "entityType": "tables" + }, + { + "name": "chat_events", + "entityType": "tables" + }, + { + "name": "chat_members", + "entityType": "tables" + }, + { + "name": "chat_revision_source", + "entityType": "tables" + }, + { + "name": "chat_revisions", + "entityType": "tables" + }, + { + "name": "chats", + "entityType": "tables" + }, + { + "name": "chunk_messages", + "entityType": "tables" + }, + { + "name": "chunks", + "entityType": "tables" + }, + { + "name": "content_authors", + "entityType": "tables" + }, + { + "name": "content_channels", + "entityType": "tables" + }, + { + "name": "content_metrics", + "entityType": "tables" + }, + { + "name": "content_post_revisions", + "entityType": "tables" + }, + { + "name": "content_posts", + "entityType": "tables" + }, + { + "name": "content_terms", + "entityType": "tables" + }, + { + "name": "contracts", + "entityType": "tables" + }, + { + "name": "conversation_messages", + "entityType": "tables" + }, + { + "name": "conversation_readiness", + "entityType": "tables" + }, + { + "name": "conversation_state", + "entityType": "tables" + }, + { + "name": "conversations", + "entityType": "tables" + }, + { + "name": "crm_fields", + "entityType": "tables" + }, + { + "name": "crm_files", + "entityType": "tables" + }, + { + "name": "deals", + "entityType": "tables" + }, + { + "name": "decision_requests", + "entityType": "tables" + }, + { + "name": "decisions", + "entityType": "tables" + }, + { + "name": "document_annotation_transfers", + "entityType": "tables" + }, + { + "name": "document_changes", + "entityType": "tables" + }, + { + "name": "document_index_pending", + "entityType": "tables" + }, + { + "name": "document_revisions", + "entityType": "tables" + }, + { + "name": "documents", + "entityType": "tables" + }, + { + "name": "email_index_pending", + "entityType": "tables" + }, + { + "name": "email_locations", + "entityType": "tables" + }, + { + "name": "email_mailboxes", + "entityType": "tables" + }, + { + "name": "email_recipients", + "entityType": "tables" + }, + { + "name": "email_threads", + "entityType": "tables" + }, + { + "name": "emails", + "entityType": "tables" + }, + { + "name": "embeddings", + "entityType": "tables" + }, + { + "name": "enrichments", + "entityType": "tables" + }, + { + "name": "entity_link_events", + "entityType": "tables" + }, + { + "name": "event_index_pending", + "entityType": "tables" + }, + { + "name": "event_series", + "entityType": "tables" + }, + { + "name": "events", + "entityType": "tables" + }, + { + "name": "fact_removals", + "entityType": "tables" + }, + { + "name": "facts", + "entityType": "tables" + }, + { + "name": "fetch_leases", + "entityType": "tables" + }, + { + "name": "files", + "entityType": "tables" + }, + { + "name": "financial_accounts", + "entityType": "tables" + }, + { + "name": "financial_transactions", + "entityType": "tables" + }, + { + "name": "identities", + "entityType": "tables" + }, + { + "name": "identity_link_events", + "entityType": "tables" + }, + { + "name": "identity_links", + "entityType": "tables" + }, + { + "name": "identity_revisions", + "entityType": "tables" + }, + { + "name": "invoice_lines", + "entityType": "tables" + }, + { + "name": "invoices", + "entityType": "tables" + }, + { + "name": "involvement_pending", + "entityType": "tables" + }, + { + "name": "involvements", + "entityType": "tables" + }, + { + "name": "leads", + "entityType": "tables" + }, + { + "name": "link_reviews", + "entityType": "tables" + }, + { + "name": "link_revisions", + "entityType": "tables" + }, + { + "name": "links", + "entityType": "tables" + }, + { + "name": "mail_rules", + "entityType": "tables" + }, + { + "name": "mailboxes", + "entityType": "tables" + }, + { + "name": "meeting_chat_messages", + "entityType": "tables" + }, + { + "name": "meeting_index_pending", + "entityType": "tables" + }, + { + "name": "meeting_participants", + "entityType": "tables" + }, + { + "name": "meeting_series", + "entityType": "tables" + }, + { + "name": "meeting_summaries", + "entityType": "tables" + }, + { + "name": "meeting_transcript_rows", + "entityType": "tables" + }, + { + "name": "meeting_transcripts", + "entityType": "tables" + }, + { + "name": "meetings", + "entityType": "tables" + }, + { + "name": "member_counts", + "entityType": "tables" + }, + { + "name": "member_observation_members", + "entityType": "tables" + }, + { + "name": "member_observations", + "entityType": "tables" + }, + { + "name": "member_stays", + "entityType": "tables" + }, + { + "name": "memories", + "entityType": "tables" + }, + { + "name": "memory_index_pending", + "entityType": "tables" + }, + { + "name": "mention_pending", + "entityType": "tables" + }, + { + "name": "mentions", + "entityType": "tables" + }, + { + "name": "message_counter_observations", + "entityType": "tables" + }, + { + "name": "message_links", + "entityType": "tables" + }, + { + "name": "message_reactions", + "entityType": "tables" + }, + { + "name": "message_revisions", + "entityType": "tables" + }, + { + "name": "message_stems_pending", + "entityType": "tables" + }, + { + "name": "message_transcripts", + "entityType": "tables" + }, + { + "name": "messages", + "entityType": "tables" + }, + { + "name": "note_index_pending", + "entityType": "tables" + }, + { + "name": "note_revisions", + "entityType": "tables" + }, + { + "name": "notes", + "entityType": "tables" + }, + { + "name": "order_lines", + "entityType": "tables" + }, + { + "name": "orders", + "entityType": "tables" + }, + { + "name": "organization_identities", + "entityType": "tables" + }, + { + "name": "organizations", + "entityType": "tables" + }, + { + "name": "payment_allocations", + "entityType": "tables" + }, + { + "name": "payments", + "entityType": "tables" + }, + { + "name": "persons", + "entityType": "tables" + }, + { + "name": "pipeline_stage_changes", + "entityType": "tables" + }, + { + "name": "pipeline_stages", + "entityType": "tables" + }, + { + "name": "pipelines", + "entityType": "tables" + }, + { + "name": "places", + "entityType": "tables" + }, + { + "name": "poll_votes", + "entityType": "tables" + }, + { + "name": "projects", + "entityType": "tables" + }, + { + "name": "proposed_actions", + "entityType": "tables" + }, + { + "name": "record_relations", + "entityType": "tables" + }, + { + "name": "records", + "entityType": "tables" + }, + { + "name": "reminders", + "entityType": "tables" + }, + { + "name": "search_index_state", + "entityType": "tables" + }, + { + "name": "searches", + "entityType": "tables" + }, + { + "name": "sender_bot_moves", + "entityType": "tables" + }, + { + "name": "sender_bots", + "entityType": "tables" + }, + { + "name": "store_settings", + "entityType": "tables" + }, + { + "name": "subscription_prices", + "entityType": "tables" + }, + { + "name": "subscriptions", + "entityType": "tables" + }, + { + "name": "sync_cursors", + "entityType": "tables" + }, + { + "name": "sync_ranges", + "entityType": "tables" + }, + { + "name": "syncs", + "entityType": "tables" + }, + { + "name": "tag_consolidations", + "entityType": "tables" + }, + { + "name": "tag_redirects", + "entityType": "tables" + }, + { + "name": "taggings", + "entityType": "tables" + }, + { + "name": "task_assignments", + "entityType": "tables" + }, + { + "name": "task_events", + "entityType": "tables" + }, + { + "name": "task_index_pending", + "entityType": "tables" + }, + { + "name": "task_key_counters", + "entityType": "tables" + }, + { + "name": "task_pairs", + "entityType": "tables" + }, + { + "name": "tasks", + "entityType": "tables" + }, + { + "name": "templates", + "entityType": "tables" + }, + { + "name": "templates_history", + "entityType": "tables" + }, + { + "name": "tracker_items", + "entityType": "tables" + }, + { + "name": "transaction_splits", + "entityType": "tables" + }, + { + "name": "transcript_index_pending", + "entityType": "tables" + }, + { + "name": "vector_index_redo", + "entityType": "tables" + }, + { + "name": "vector_indexes", + "entityType": "tables" + }, + { + "table": "account_identities", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "last_messaged_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_score", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_signals", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_scored_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "mail_demoted", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "address_book", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "provider", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "settings", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'personal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "accounts", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "actor_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "actor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "tool", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "tier", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "target_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "started_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "finished_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "agent_actions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "aliasable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "aliasable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "display", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "aliases", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "attachable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "attachable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "width", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "height", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "duration", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "provider_ref", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "local_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extraction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extractor", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extraction_error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "content_sha256", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "extracted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "local_path_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "attachments", + "name": "contact", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "payload", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "received_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "handled_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "replayed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bot_updates", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "owner_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "token_digest", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "last_seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "disabled_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "bots", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "calendar_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "series_entry_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "event_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "event_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "ical_uid", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "original_starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "exception", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "all_day", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "start_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "end_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "recurrence_ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "event_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "transparency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "visibility", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "own_response", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "organizer_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "join_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "join_key", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "conference", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "sequence", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "etag", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entries", + "name": "series_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "entry_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "email", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "response", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "optional", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "organizer", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "self", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "resource", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_participants", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "entry_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "recurrence_ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendar_entry_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "access_role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "primary_calendar", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "synced", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "calendars", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "tag_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "algorithm", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "score", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "fields", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_auto_tag_claims", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'tag'", + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "canonical_tags", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "sku", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "supplier_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "supplier_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "unit", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "unit_price", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "archived_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "catalog_items", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_event_people", + "name": "chat_event_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_event_people", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "source_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "action", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "actor_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "happened_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_events", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_members", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_members", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_members", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revision_source", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revision_source", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revision_source", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "field", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "old_value", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "new_value", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "source", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chat_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "unread_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "last_message_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "participants_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "username", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "membership_state", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "searchable", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "message_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "members_tracked_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "details_fetched_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "parent_chat_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "scope", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "muted", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "muted_until", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "archived", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "marked_unread", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "unread_counted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chats", + "name": "title_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "chunk_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "first_message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "last_message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "text_start", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunk_messages", + "name": "text_end", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "chunkable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "chunkable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "start_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "end_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "scope", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "occurred_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "chunks", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "email", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_authors", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "network", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "handle", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_channels", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "post_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "views", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "reactions", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "comments", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "shares", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "clicks", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_metrics", + "name": "raw", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "post_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "version", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "reason", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_post_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "channel_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "title_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "published_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "scheduled_for", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "source_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "version", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "normalized_text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_posts", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "slug", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "parent_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "tag_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "content_terms", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "number", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "signed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "effective_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "expiration_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "auto_renew", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "renewal_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "renewal_unit", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "notice_days", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "terms", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "value", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "deal_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "contracts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_messages", + "name": "conversation_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_messages", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "new_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "edited_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "deleted_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "chunks", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "embedded_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "current", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "stale", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_readiness", + "name": "counted_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "chat_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "enabled_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "built_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "algorithm_version", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversation_state", + "name": "current_build", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "first_message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "build", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "first_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "last_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "message_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "built_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "algorithm_version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "conversations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "code", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "label", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "multiple", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "filterable", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "options", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_fields", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "owner_kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "owner_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "owner_assignee", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "local_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "content_sha256", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "extraction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "extraction_error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "downloaded_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "crm_files", + "name": "downloaded_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "stage_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "amount", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "close_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "closed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "rank", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "deals", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "token_digest", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "proposal_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "action", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "batch_digest", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "channel", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "bot_profile", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "chat_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "message_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "owner_user_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "expires_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "used_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decision_requests", + "name": "cancelled_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "statement", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "supersedes_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "decisions", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "source_key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "collection", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "snapshot_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "bindings_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "reference_map", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_annotation_transfers", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "document_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "path", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "event", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_changes", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "document_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "front_matter", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "document_revisions", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "file_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "extension", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "storage", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "local_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "content_hash", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "front_matter", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "extraction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "extraction_error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "language", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "export_path", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "pinned_file_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "documents", + "name": "removal", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "mailbox_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "uidvalidity", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "uid", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_locations", + "name": "email_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_mailboxes", + "name": "email_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_mailboxes", + "name": "mailbox_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_mailboxes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "email_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "address", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_recipients", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "subject", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "last_email_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "emails_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "email_threads", + "name": "subject_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "email_thread_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "subject", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "from_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "from_address", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "from_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "sent_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "received_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "in_reply_to", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "references", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "body_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "body_html", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "snippet", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "outgoing", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "read", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "flagged", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "draft", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "headers", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "emails", + "name": "mail_rule_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "content_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "dims", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "vector", + "type": "blob", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "embeddings", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "subject_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "subject_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "source_hash", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "provider", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "tokens", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "enrichments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "linkable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "linkable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "entity_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "from_entity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "to_entity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "confidence", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "entity_link_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "origin", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "event_series", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "event_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "origin", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "all_day", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "events", + "name": "source_deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "fact_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "subject", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "removed_by", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "bot", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fact_removals", + "name": "removed_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "statement", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "subject_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "subject_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "occurred_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "supersedes_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "scope", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "facts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "anchor", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "holder", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "fetch_leases", + "name": "expires_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "path", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "path_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "parent_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "document_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "mime", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "size", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "content_hash", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "seen_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "files", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "institution", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "number_hint", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "holder_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "holder_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "opening_balance", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "opening_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "closed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_accounts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "financial_account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "statement_date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "booked_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "counterparty_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "counterparty_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "counterparty_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "reference", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "payment_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "financial_transactions", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "provider", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "username", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "bot", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "phone_hmac", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "email", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "phone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identities", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "from_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "to_person_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_link_events", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "person_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "confidence", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "source", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_links", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "username", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "marks", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "identity_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "invoice_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "description", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "quantity", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "unit_price", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoice_lines", + "name": "catalog_item_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "number", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "issuer_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "issuer_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "counterparty_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "counterparty_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "total", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "issue_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "due_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "contract_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "invoices", + "name": "subscription_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvement_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvement_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "subject_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "subject_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "occurred_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "involvements", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "stage_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "amount", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "close_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "closed_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "rank", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "deal_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "leads", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "linkable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "linkable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "entity_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "candidates", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "reason", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "chosen_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "decided_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_reviews", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "link_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "change", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "before", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "after", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "author", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "link_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "from_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "from_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "to_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "to_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "anchor", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "target_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "target_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "evidence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "confirmed", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "author", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "purpose", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "starts_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "ends_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "links", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "conditions", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "actions", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "protected", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "decided_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mail_rules", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mailboxes", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "sent_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "sender_participant_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "sender_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "recipient", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_chat_messages", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "display_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "email", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "joined_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "left_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "duration_ms", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "sessions", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_participants", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "event_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "recurrence", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "host_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "join_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_series", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "overview", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "sections", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "next_steps", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "content", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "doc_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "external_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_summaries", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "start_ms", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "end_ms", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "speaker_participant_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "speaker_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcript_rows", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "meeting_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "format", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "language", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "content_hash", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "external_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "superseded_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meeting_transcripts", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "meeting_series_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "event_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "location", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "join_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "started_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "ended_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "duration_ms", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "timezone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "host_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "participants_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "title_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "join_key", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "direction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "meetings", + "name": "client_phone", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "reported_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "listed_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "complete_list", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_counts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observation_members", + "name": "member_observation_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observation_members", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observation_members", + "name": "member_stay_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "observed_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "started_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "complete", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "reported_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "listed_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_observations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "first_seen_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "last_seen_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "joined_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "invited_by_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "left_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "member_stays", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "subject_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "subject_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "confidence", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "last_verified_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "supersedes_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memories", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memory_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "memory_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mention_pending", + "name": "source_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mention_pending", + "name": "source_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "source_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "source_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "source_field", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "start_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "end_offset", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "domain", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "confidence", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "target_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "author", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "mentions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "counter", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "value", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_counter_observations", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "parent_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "confidence", + "type": "real", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "version", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "batch", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "build", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "stale_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_links", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "message_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "own", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "reaction", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "reacted_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_reactions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "message_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "edited_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_stems_pending", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "message_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "message_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "heard_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "message_transcripts", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "thread_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sender_identity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sender_chat_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sender_name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "sent_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "edited_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "reply_to_external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "reply_to", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "forward", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "outgoing", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "reactions", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "normalized_text", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "normalizer_version", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "mentions", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "thread_root_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "starred", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "messages", + "name": "delivery", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "note_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "note_revisions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "notable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "notable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "title", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "author_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "author_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "notes", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "order_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "description", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "quantity", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "unit_price", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "catalog_item_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "order_lines", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "customer_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "customer_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "purpose", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "supplier_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "supplier_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "supplier_name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "number", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "currency", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "total", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "order_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "fulfilled_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "invoice_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "payment_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "source_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "contract_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "deal_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "orders", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'purchase'", + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "organization_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "method", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organization_identities", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'personal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "organizations", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "payment_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "invoice_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payment_allocations", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payer_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payer_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payee_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payee_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "payment_date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "reference", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "refund_of", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "payments", + "name": "subscription_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "owner", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "name_order", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "messages_from", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "task_count", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "persons", + "name": "last_contact", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "item_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "item_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "from_stage_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "to_stage_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stage_changes", + "name": "changed_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "pipeline_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "outcome", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'open'", + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "base_stage_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipeline_stages", + "name": "base_confirmed", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'deal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "name_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "pipelines", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "address", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "places", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "message_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "answers", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "voted_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "poll_votes", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "scope", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": "'personal'", + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "owner_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "owner_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "tasks_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "status", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "projects", + "name": "name_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "account_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "target_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "payload", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "proposed_by_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "proposed_by_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "decided_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "decided_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "executed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "result", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "verdict", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "proposed_actions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "record_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "target_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "target_external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "target_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "amount", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "record_relations", + "name": "as_role", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "fields", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "revision", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "entity_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "entity_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "projected_fingerprint", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "batch_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "records", + "name": "created_entity", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "task_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "due_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "timezone", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "state", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "lease_until", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "receipt", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "reminders", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "watermark", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "filled_through", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "terms_through", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "normalizer_version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "built_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "search_index_state", + "name": "analyzer", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "command", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "params", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "language", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "fields_version", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "last_run_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "runs", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "searches", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "identity_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "from_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "from_bot_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "to_person_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "to_bot_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bot_moves", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "person_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "name", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "organization_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "author", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sender_bots", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "store_settings", + "name": "key", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "store_settings", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "store_settings", + "name": "at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "subscription_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "currency", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "effective_from", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscription_prices", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "name", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "direction", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "supplier_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "supplier_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "customer_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "customer_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "catalog_item_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "contract_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "interval_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "interval_unit", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "start_date", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "trial_end_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "next_renewal_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "cancelled_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "end_date", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "review", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "model", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "confirmed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "confirmed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "subscriptions", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "value", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_cursors", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "chat_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "from_key", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "to_key", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "sync_ranges", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "started_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "finished_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "counts", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "error", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "syncs", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "source_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "survivor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "source_member_ids", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "survivor_member_ids", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "actor_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "actor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "idempotency_key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "vocabulary_fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "preview_fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "counts", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_consolidations", + "name": "request_fingerprint", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_redirects", + "name": "source_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_redirects", + "name": "survivor_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tag_redirects", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "tag_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "taggable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "taggable_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "main", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "0", + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "author_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "author_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "taggings", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "task_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "assignee_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "assignee_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "role", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_assignments", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "task_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "actor_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "actor_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "changes", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_events", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_key_counters", + "name": "prefix", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_key_counters", + "name": "tasks_count", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "task_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "source_locator", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "other_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "score", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "band", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "levels", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "reasons", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decision", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decided_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decided_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "decided_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "task_pairs", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "project_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "number", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "description", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "status", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "priority", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "parent_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "due_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "started_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "closed_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "closed_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "closed_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "author_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "author_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "package_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_locator", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_kind", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_group", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "resolution", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "verdict", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "metadata", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "next_check_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "title_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_reason_folded", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "category", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "claimed_by", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "claimed_until", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_certainty", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_as", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_by_type", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_by_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_certainty", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_reason", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "close_suggested_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "priority_score", + "type": "real", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "agent", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "revision", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": "1", + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "provider", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "external_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tasks", + "name": "source_url", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "channel", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "language", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates", + "name": "updated_by", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "key", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "channel", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "language", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "body", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "saved_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "saved_by", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "templates_history", + "name": "replaced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "account_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "kind", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "external_id", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "parent_id", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "title", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "title_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "body", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "normalized_text", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "data", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "source_created_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "source_updated_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "archived_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "deleted_at", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "tracker_items", + "name": "synced_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": true, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "transaction_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "position", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "category", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "category_folded", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "amount", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "project_id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "note", + "type": "text", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "created_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transaction_splits", + "name": "updated_at", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transcript_index_pending", + "name": "id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "transcript_index_pending", + "name": "indexable_type", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_index_redo", + "name": "chunk_id", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "id", + "type": "integer", + "notNull": false, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "model", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "dims", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "ready", + "type": "integer", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "vector_indexes", + "name": "filled_through", + "type": "text", + "notNull": true, + "autoincrement": false, + "default": null, + "generated": null, + "entityType": "columns" + }, + { + "table": "account_identities", + "name": "account_identities_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "account_identities", + "name": "account_identities_in_address_book", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "address_book = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "accounts", + "name": "accounts_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "agent_actions", + "name": "agent_actions_by_started_at_desc", + "columns": [ + { + "value": "\"started_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "agent_actions", + "name": "agent_actions_by_actor_type_actor_id", + "columns": [ + { + "value": "actor_type", + "isExpression": false + }, + { + "value": "actor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "agent_actions", + "name": "agent_actions_by_target_type_target_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_displayed", + "columns": [ + { + "value": "aliasable_type", + "isExpression": false + }, + { + "value": "aliasable_id", + "isExpression": false + }, + { + "value": "ifnull(\"account_id\", 0)", + "isExpression": true + } + ], + "isUnique": true, + "where": "display = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_by_aliasable_type_aliasable_id_name_folded", + "columns": [ + { + "value": "aliasable_type", + "isExpression": false + }, + { + "value": "aliasable_id", + "isExpression": false + }, + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NULL AND aliasable_type = 'project' OR account_id IS NULL AND aliasable_type = 'tag'", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_by_aliasable_type_aliasable_id", + "columns": [ + { + "value": "aliasable_type", + "isExpression": false + }, + { + "value": "aliasable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "aliases", + "name": "aliases_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "attachments", + "name": "attachments_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "attachments", + "name": "attachments_local_path_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "local_path IS NOT NULL AND local_path_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "bot_updates", + "name": "bot_updates_by_account_id_received_at_desc", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"received_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "bots", + "name": "bots_by_owner_person_id", + "columns": [ + { + "value": "owner_person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_calendar_id_starts_at", + "columns": [ + { + "value": "calendar_id", + "isExpression": false + }, + { + "value": "starts_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_ical_uid", + "columns": [ + { + "value": "ical_uid", + "isExpression": false + } + ], + "isUnique": false, + "where": "ical_uid IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_join_key", + "columns": [ + { + "value": "join_key", + "isExpression": false + } + ], + "isUnique": false, + "where": "join_key IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_calendar_id_series_external_id", + "columns": [ + { + "value": "calendar_id", + "isExpression": false + }, + { + "value": "series_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "series_external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_event_id", + "columns": [ + { + "value": "event_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_event_series_id", + "columns": [ + { + "value": "event_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_event_type_event_id", + "columns": [ + { + "value": "event_type", + "isExpression": false + }, + { + "value": "event_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_by_organizer_identity_id", + "columns": [ + { + "value": "organizer_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entry_participants", + "name": "calendar_entry_participants_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "calendar_entry_revisions", + "name": "calendar_entry_revisions_by_entry_id_created_at", + "columns": [ + { + "value": "entry_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "canonical_auto_tag_claims", + "name": "canonical_auto_tag_claims_by_tag_id", + "columns": [ + { + "value": "tag_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_supplier_type_supplier_id_sku", + "columns": [ + { + "value": "supplier_type", + "isExpression": false + }, + { + "value": "supplier_id", + "isExpression": false + }, + { + "value": "sku", + "isExpression": false + } + ], + "isUnique": true, + "where": "supplier_id IS NOT NULL AND sku IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_sku", + "columns": [ + { + "value": "sku", + "isExpression": false + } + ], + "isUnique": true, + "where": "supplier_id IS NULL AND sku IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "catalog_items", + "name": "catalog_items_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_event_people", + "name": "chat_event_people_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_events", + "name": "chat_events_by_chat_id_happened_at", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "happened_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_events", + "name": "chat_events_by_actor_identity_id", + "columns": [ + { + "value": "actor_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_members", + "name": "chat_members_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_revisions", + "name": "chat_revisions_by_chat_id_created_at", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chat_revisions", + "name": "chat_revisions_by_account_id_old_value", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "old_value", + "isExpression": false + } + ], + "isUnique": false, + "where": "field = 'external_id'", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chats", + "name": "chats_by_recency", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"last_message_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chats", + "name": "chats_title_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "title IS NOT NULL AND title_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chats", + "name": "chats_by_parent_chat_id", + "columns": [ + { + "value": "parent_chat_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunk_messages", + "name": "chunk_messages_by_first_message_id", + "columns": [ + { + "value": "first_message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunk_messages", + "name": "chunk_messages_by_last_message_id", + "columns": [ + { + "value": "last_message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_content_hash", + "columns": [ + { + "value": "content_hash", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_scope_occurred_at", + "columns": [ + { + "value": "scope", + "isExpression": false + }, + { + "value": "occurred_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "chunks", + "name": "chunks_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_metrics", + "name": "content_metrics_by_post_id_at", + "columns": [ + { + "value": "post_id", + "isExpression": false + }, + { + "value": "at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_post_revisions", + "name": "content_post_revisions_by_post_id_created_at", + "columns": [ + { + "value": "post_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_posts", + "name": "content_posts_by_account_id_status", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "status", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_posts", + "name": "content_posts_by_account_id_published_at", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "published_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "content_terms", + "name": "content_terms_by_tag_id", + "columns": [ + { + "value": "tag_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_deal_id", + "columns": [ + { + "value": "deal_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "contracts", + "name": "contracts_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversation_messages", + "name": "conversation_messages_by_message_id", + "columns": [ + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversation_readiness", + "name": "conversation_readiness_by_model", + "columns": [ + { + "value": "model", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversations", + "name": "conversations_by_chat", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "build", + "isExpression": false + }, + { + "value": "first_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "conversations", + "name": "conversations_by_first_message_id", + "columns": [ + { + "value": "first_message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "crm_files", + "name": "crm_files_by_account_id_owner_kind_owner_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "owner_kind", + "isExpression": false + }, + { + "value": "owner_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_account_id_external_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL AND external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_stage_id", + "columns": [ + { + "value": "stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "deals", + "name": "deals_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decision_requests", + "name": "decision_requests_by_channel_bot_profile_chat_id_message_id", + "columns": [ + { + "value": "channel", + "isExpression": false + }, + { + "value": "bot_profile", + "isExpression": false + }, + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decisions", + "name": "decisions_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decisions", + "name": "decisions_by_supersedes_id", + "columns": [ + { + "value": "supersedes_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "decisions", + "name": "decisions_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "document_changes", + "name": "document_changes_by_account_id_at", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "document_revisions", + "name": "document_revisions_by_document_id", + "columns": [ + { + "value": "document_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_locations", + "name": "email_locations_by_email_id", + "columns": [ + { + "value": "email_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_mailboxes", + "name": "email_mailboxes_by_mailbox_id", + "columns": [ + { + "value": "mailbox_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_recipients", + "name": "email_recipients_by_email_id", + "columns": [ + { + "value": "email_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_recipients", + "name": "email_recipients_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "email_threads", + "name": "email_threads_subject_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "subject IS NOT NULL AND subject_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_time", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"sent_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_mail_rule_id", + "columns": [ + { + "value": "mail_rule_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "mail_rule_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_list_id", + "columns": [ + { + "value": "coalesce(json_extract(headers, '$.\"list-id\"'), json_extract(metadata, '$.listId'))", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_email_thread_id", + "columns": [ + { + "value": "email_thread_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "emails", + "name": "emails_by_from_identity_id", + "columns": [ + { + "value": "from_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "entity_link_events", + "name": "entity_link_events_by_linkable_type_linkable_id", + "columns": [ + { + "value": "linkable_type", + "isExpression": false + }, + { + "value": "linkable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "entity_link_events", + "name": "entity_link_events_by_entity_type_to_entity_id", + "columns": [ + { + "value": "entity_type", + "isExpression": false + }, + { + "value": "to_entity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "events", + "name": "events_by_time", + "columns": [ + { + "value": "starts_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "events", + "name": "events_by_event_series_id", + "columns": [ + { + "value": "event_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "fact_removals", + "name": "fact_removals_by_removed_at", + "columns": [ + { + "value": "removed_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_subject_type_subject_id", + "columns": [ + { + "value": "subject_type", + "isExpression": false + }, + { + "value": "subject_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_supersedes_id", + "columns": [ + { + "value": "supersedes_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "facts", + "name": "facts_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_by_account_id_path_folded", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "path_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_path_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "path_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_by_parent_id", + "columns": [ + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "files", + "name": "files_by_document_id", + "columns": [ + { + "value": "document_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_by_holder_type_holder_id", + "columns": [ + { + "value": "holder_type", + "isExpression": false + }, + { + "value": "holder_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_financial_account_id_booked_date", + "columns": [ + { + "value": "financial_account_id", + "isExpression": false + }, + { + "value": "booked_date", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_payment_id", + "columns": [ + { + "value": "payment_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "payment_id IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_counterparty_type_counterparty_id", + "columns": [ + { + "value": "counterparty_type", + "isExpression": false + }, + { + "value": "counterparty_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identities", + "name": "identities_by_email", + "columns": [ + { + "value": "email", + "isExpression": false + } + ], + "isUnique": false, + "where": "email IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identities", + "name": "identities_name_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "name IS NOT NULL AND name_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_by_from_person_id", + "columns": [ + { + "value": "from_person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_by_to_person_id", + "columns": [ + { + "value": "to_person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_links", + "name": "identity_links_by_person_id", + "columns": [ + { + "value": "person_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "identity_revisions", + "name": "identity_revisions_by_identity", + "columns": [ + { + "value": "identity_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_by_catalog_item_id", + "columns": [ + { + "value": "catalog_item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_issuer_type_issuer_id", + "columns": [ + { + "value": "issuer_type", + "isExpression": false + }, + { + "value": "issuer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_counterparty_type_counterparty_id", + "columns": [ + { + "value": "counterparty_type", + "isExpression": false + }, + { + "value": "counterparty_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_contract_id", + "columns": [ + { + "value": "contract_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "invoices", + "name": "invoices_by_subscription_id", + "columns": [ + { + "value": "subscription_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_person", + "columns": [ + { + "value": "person_id", + "isExpression": false + }, + { + "value": "\"occurred_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_identity", + "columns": [ + { + "value": "identity_id", + "isExpression": false + }, + { + "value": "\"occurred_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_subject_type_subject_id", + "columns": [ + { + "value": "subject_type", + "isExpression": false + }, + { + "value": "subject_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "involvements", + "name": "involvements_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_account_id_external_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL AND external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_stage_id", + "columns": [ + { + "value": "stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_deal_id", + "columns": [ + { + "value": "deal_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "leads", + "name": "leads_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "link_reviews", + "name": "link_reviews_by_status_created_at", + "columns": [ + { + "value": "status", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "link_revisions", + "name": "link_revisions_by_link_id_created_at", + "columns": [ + { + "value": "link_id", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_unresolved", + "columns": [ + { + "value": "target_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": "to_id IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_relationship_key", + "columns": [ + { + "value": "kind", + "isExpression": false + }, + { + "value": "from_type", + "isExpression": false + }, + { + "value": "from_id", + "isExpression": false + }, + { + "value": "to_type", + "isExpression": false + }, + { + "value": "to_id", + "isExpression": false + }, + { + "value": "ifnull(\"anchor\", '')", + "isExpression": true + }, + { + "value": "ifnull(\"role\", '')", + "isExpression": true + }, + { + "value": "ifnull(\"account_id\", 0)", + "isExpression": true + } + ], + "isUnique": true, + "where": "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'partner-of') AND to_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_by_from_type_from_id", + "columns": [ + { + "value": "from_type", + "isExpression": false + }, + { + "value": "from_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "links", + "name": "links_by_to_type_to_id", + "columns": [ + { + "value": "to_type", + "isExpression": false + }, + { + "value": "to_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mailboxes", + "name": "mailboxes_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mailboxes", + "name": "mailboxes_name_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "name_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_by_meeting_id_external_id", + "columns": [ + { + "value": "meeting_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_by_meeting_id", + "columns": [ + { + "value": "meeting_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_by_sender_participant_id", + "columns": [ + { + "value": "sender_participant_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_series", + "name": "meeting_series_by_event_series_id", + "columns": [ + { + "value": "event_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_series", + "name": "meeting_series_by_host_identity_id", + "columns": [ + { + "value": "host_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_rows_by_speaker_participant_id", + "columns": [ + { + "value": "speaker_participant_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meeting_transcripts", + "name": "meeting_transcripts_by_meeting_id", + "columns": [ + { + "value": "meeting_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_join_key", + "columns": [ + { + "value": "join_key", + "isExpression": false + } + ], + "isUnique": false, + "where": "join_key IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_join_key_to_fill", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "join_url IS NOT NULL AND join_key IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_time", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "\"started_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_account_id_title_folded", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "title_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_title_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "title IS NOT NULL AND title_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_meeting_series_id", + "columns": [ + { + "value": "meeting_series_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_event_id", + "columns": [ + { + "value": "event_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "meetings", + "name": "meetings_by_host_identity_id", + "columns": [ + { + "value": "host_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_observation_members", + "name": "member_observation_members_by_member_stay_id", + "columns": [ + { + "value": "member_stay_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_observation_members", + "name": "member_observation_members_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_observations", + "name": "member_observations_by_chat_id_observed_at_id", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "observed_at", + "isExpression": false + }, + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_stays", + "name": "member_stays_open", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "left_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_stays", + "name": "member_stays_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "member_stays", + "name": "member_stays_by_invited_by_identity_id", + "columns": [ + { + "value": "invited_by_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_subject_type_subject_id", + "columns": [ + { + "value": "subject_type", + "isExpression": false + }, + { + "value": "subject_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_supersedes_id", + "columns": [ + { + "value": "supersedes_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "memories", + "name": "memories_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_kind_value", + "columns": [ + { + "value": "kind", + "isExpression": false + }, + { + "value": "value", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_domain", + "columns": [ + { + "value": "domain", + "isExpression": false + } + ], + "isUnique": false, + "where": "domain IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_status_kind", + "columns": [ + { + "value": "status", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "mentions", + "name": "mentions_by_target_type_target_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "target_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_links", + "name": "message_links_unique", + "columns": [ + { + "value": "message_id", + "isExpression": false + }, + { + "value": "ifnull(\"parent_id\", 0)", + "isExpression": true + }, + { + "value": "source", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + }, + { + "value": "ifnull(\"build\", 0)", + "isExpression": true + } + ], + "isUnique": true, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_links", + "name": "message_links_by_build", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "build", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_links", + "name": "message_links_by_parent_id", + "columns": [ + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_reactions", + "name": "message_reactions_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_revisions", + "name": "message_revisions_by_message_id", + "columns": [ + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "message_transcripts", + "name": "message_transcripts_by_message_id", + "columns": [ + { + "value": "message_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_time", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "\"sent_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_starred_by_time", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "\"sent_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": "starred = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_reply", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "reply_to_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "reply_to_external_id IS NOT NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_account", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_to_normalize", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "normalized_text IS NULL AND deleted_at IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_chat_id_thread_external_id", + "columns": [ + { + "value": "chat_id", + "isExpression": false + }, + { + "value": "thread_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "thread_root_id IS NULL AND thread_external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_sender_identity_id", + "columns": [ + { + "value": "sender_identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "messages", + "name": "messages_by_thread_root_id", + "columns": [ + { + "value": "thread_root_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "note_revisions", + "name": "note_revisions_by_note_id", + "columns": [ + { + "value": "note_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "notes", + "name": "notes_by_notable_type_notable_id", + "columns": [ + { + "value": "notable_type", + "isExpression": false + }, + { + "value": "notable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "notes", + "name": "notes_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "order_lines", + "name": "order_lines_by_catalog_item_id", + "columns": [ + { + "value": "catalog_item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_customer_type_customer_id", + "columns": [ + { + "value": "customer_type", + "isExpression": false + }, + { + "value": "customer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_supplier_type_supplier_id", + "columns": [ + { + "value": "supplier_type", + "isExpression": false + }, + { + "value": "supplier_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_invoice_id", + "columns": [ + { + "value": "invoice_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_payment_id", + "columns": [ + { + "value": "payment_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_contract_id", + "columns": [ + { + "value": "contract_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "orders", + "name": "orders_by_deal_id", + "columns": [ + { + "value": "deal_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "organization_identities", + "name": "organization_identities_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_by_invoice_id", + "columns": [ + { + "value": "invoice_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_payer_type_payer_id", + "columns": [ + { + "value": "payer_type", + "isExpression": false + }, + { + "value": "payer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_payee_type_payee_id", + "columns": [ + { + "value": "payee_type", + "isExpression": false + }, + { + "value": "payee_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_refund_of", + "columns": [ + { + "value": "refund_of", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "payments", + "name": "payments_by_subscription_id", + "columns": [ + { + "value": "subscription_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "persons", + "name": "persons_by_kind", + "columns": [ + { + "value": "kind", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "persons", + "name": "persons_kind_to_work_out", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "kind IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_item_type_item_id", + "columns": [ + { + "value": "item_type", + "isExpression": false + }, + { + "value": "item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_pipeline_id", + "columns": [ + { + "value": "pipeline_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_from_stage_id", + "columns": [ + { + "value": "from_stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_by_to_stage_id", + "columns": [ + { + "value": "to_stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_by_pipeline_id_external_id", + "columns": [ + { + "value": "pipeline_id", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_by_pipeline_id_position", + "columns": [ + { + "value": "pipeline_id", + "isExpression": false + }, + { + "value": "position", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_by_base_stage_id", + "columns": [ + { + "value": "base_stage_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipelines", + "name": "pipelines_by_account_id_kind_external_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL AND external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "pipelines", + "name": "pipelines_by_name_folded_kind", + "columns": [ + { + "value": "name_folded", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + } + ], + "isUnique": true, + "where": "account_id IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "poll_votes", + "name": "poll_votes_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_name_folded", + "columns": [ + { + "value": "name_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_name_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "name_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_organization_id", + "columns": [ + { + "value": "organization_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "projects", + "name": "projects_by_owner_type_owner_id", + "columns": [ + { + "value": "owner_type", + "isExpression": false + }, + { + "value": "owner_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_status_created_at", + "columns": [ + { + "value": "status", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_target_type_target_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_proposed_by_type_proposed_by_id", + "columns": [ + { + "value": "proposed_by_type", + "isExpression": false + }, + { + "value": "proposed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_by_decided_by_type_decided_by_id", + "columns": [ + { + "value": "decided_by_type", + "isExpression": false + }, + { + "value": "decided_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "record_relations", + "name": "record_relations_by_target_type_target_external_id", + "columns": [ + { + "value": "target_type", + "isExpression": false + }, + { + "value": "target_external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "record_relations", + "name": "record_relations_by_target_id", + "columns": [ + { + "value": "target_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "records", + "name": "records_by_account_id_batch_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "batch_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "records", + "name": "records_by_entity_type_entity_id", + "columns": [ + { + "value": "entity_type", + "isExpression": false + }, + { + "value": "entity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "reminders", + "name": "reminders_due", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "state", + "isExpression": false + }, + { + "value": "due_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "reminders", + "name": "reminders_by_task_id", + "columns": [ + { + "value": "task_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "searches", + "name": "searches_history", + "columns": [ + { + "value": "command", + "isExpression": false + }, + { + "value": "params", + "isExpression": false + } + ], + "isUnique": true, + "where": "name IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "searches", + "name": "searches_by_last_run", + "columns": [ + { + "value": "\"last_run_at\" desc", + "isExpression": true + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "sender_bot_moves", + "name": "sender_bot_moves_by_identity_id", + "columns": [ + { + "value": "identity_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_by_subscription_id_effective_from", + "columns": [ + { + "value": "subscription_id", + "isExpression": false + }, + { + "value": "effective_from", + "isExpression": false + } + ], + "isUnique": true, + "where": "review <> 'rejected'", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscription_prices", + "name": "subscription_prices_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_supplier_type_supplier_id", + "columns": [ + { + "value": "supplier_type", + "isExpression": false + }, + { + "value": "supplier_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_customer_type_customer_id", + "columns": [ + { + "value": "customer_type", + "isExpression": false + }, + { + "value": "customer_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_catalog_item_id", + "columns": [ + { + "value": "catalog_item_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_contract_id", + "columns": [ + { + "value": "contract_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "subscriptions", + "name": "subscriptions_by_confirmed_by_type_confirmed_by_id", + "columns": [ + { + "value": "confirmed_by_type", + "isExpression": false + }, + { + "value": "confirmed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "syncs", + "name": "syncs_by_account_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_by_source_id", + "columns": [ + { + "value": "source_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_by_survivor_id", + "columns": [ + { + "value": "survivor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_consolidations", + "name": "tag_consolidations_by_actor_type_actor_id", + "columns": [ + { + "value": "actor_type", + "isExpression": false + }, + { + "value": "actor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tag_redirects", + "name": "tag_redirects_by_survivor_id", + "columns": [ + { + "value": "survivor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "taggings", + "name": "taggings_main_topic", + "columns": [ + { + "value": "taggable_type", + "isExpression": false + }, + { + "value": "taggable_id", + "isExpression": false + } + ], + "isUnique": true, + "where": "main = 1", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "taggings", + "name": "taggings_by_taggable_type_taggable_id", + "columns": [ + { + "value": "taggable_type", + "isExpression": false + }, + { + "value": "taggable_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "taggings", + "name": "taggings_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_assignments", + "name": "task_assignments_by_assignee_type_assignee_id", + "columns": [ + { + "value": "assignee_type", + "isExpression": false + }, + { + "value": "assignee_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_events", + "name": "task_events_by_task_id", + "columns": [ + { + "value": "task_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_events", + "name": "task_events_by_actor_type_actor_id", + "columns": [ + { + "value": "actor_type", + "isExpression": false + }, + { + "value": "actor_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_pairs", + "name": "task_pairs_by_decision_created_at", + "columns": [ + { + "value": "decision", + "isExpression": false + }, + { + "value": "created_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_pairs", + "name": "task_pairs_by_other_id", + "columns": [ + { + "value": "other_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "task_pairs", + "name": "task_pairs_by_decided_by_type_decided_by_id", + "columns": [ + { + "value": "decided_by_type", + "isExpression": false + }, + { + "value": "decided_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_title_folded", + "columns": [ + { + "value": "title_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_close_reason_to_fold", + "columns": [ + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": "close_reason IS NOT NULL AND close_reason_folded IS NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_status", + "columns": [ + { + "value": "project_id", + "isExpression": false + }, + { + "value": "status", + "isExpression": false + }, + { + "value": "due_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_project_id_status_next_check_at", + "columns": [ + { + "value": "project_id", + "isExpression": false + }, + { + "value": "status", + "isExpression": false + }, + { + "value": "next_check_at", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_project_id_source_locator", + "columns": [ + { + "value": "project_id", + "isExpression": false + }, + { + "value": "source_locator", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_source_group", + "columns": [ + { + "value": "source_group", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_provider_external_id", + "columns": [ + { + "value": "provider", + "isExpression": false + }, + { + "value": "external_id", + "isExpression": false + } + ], + "isUnique": false, + "where": "external_id IS NOT NULL", + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_parent_id", + "columns": [ + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_closed_by_type_closed_by_id", + "columns": [ + { + "value": "closed_by_type", + "isExpression": false + }, + { + "value": "closed_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_author_type_author_id", + "columns": [ + { + "value": "author_type", + "isExpression": false + }, + { + "value": "author_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tasks", + "name": "tasks_by_close_suggested_by_type_close_suggested_by_id", + "columns": [ + { + "value": "close_suggested_by_type", + "isExpression": false + }, + { + "value": "close_suggested_by_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "templates_history", + "name": "templates_history_by_key_channel_language_id", + "columns": [ + { + "value": "key", + "isExpression": false + }, + { + "value": "channel", + "isExpression": false + }, + { + "value": "language", + "isExpression": false + }, + { + "value": "id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "tracker_items", + "name": "tracker_items_by_account_id_kind_parent_id", + "columns": [ + { + "value": "account_id", + "isExpression": false + }, + { + "value": "kind", + "isExpression": false + }, + { + "value": "parent_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "transaction_splits", + "name": "transaction_splits_by_category_folded", + "columns": [ + { + "value": "category_folded", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "transaction_splits", + "name": "transaction_splits_by_project_id", + "columns": [ + { + "value": "project_id", + "isExpression": false + } + ], + "isUnique": false, + "where": null, + "origin": "manual", + "entityType": "indexes" + }, + { + "table": "account_identities", + "name": "fk_account_identities_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "account_identities", + "name": "fk_account_identities_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "accounts", + "name": "fk_accounts_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "aliases", + "name": "fk_aliases_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "bot_updates", + "name": "fk_bot_updates_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "bots", + "name": "fk_bots_owner_person_id_persons_id_fk", + "columns": [ + "owner_person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_calendar_id_calendars_id_fk", + "columns": [ + "calendar_id" + ], + "tableTo": "calendars", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_series_entry_id_calendar_entries_id_fk", + "columns": [ + "series_entry_id" + ], + "tableTo": "calendar_entries", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_event_id_events_id_fk", + "columns": [ + "event_id" + ], + "tableTo": "events", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_event_series_id_event_series_id_fk", + "columns": [ + "event_series_id" + ], + "tableTo": "event_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entries", + "name": "fk_calendar_entries_organizer_identity_id_identities_id_fk", + "columns": [ + "organizer_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entry_participants", + "name": "fk_calendar_entry_participants_entry_id_calendar_entries_id_fk", + "columns": [ + "entry_id" + ], + "tableTo": "calendar_entries", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entry_participants", + "name": "fk_calendar_entry_participants_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendar_entry_revisions", + "name": "fk_calendar_entry_revisions_entry_id_calendar_entries_id_fk", + "columns": [ + "entry_id" + ], + "tableTo": "calendar_entries", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "calendars", + "name": "fk_calendars_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "canonical_auto_tag_claims", + "name": "fk_auto_tag_claims_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "canonical_auto_tag_claims", + "name": "fk_auto_tag_claims_tag_id_tags_id_fk", + "columns": [ + "tag_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_event_people", + "name": "fk_chat_event_people_chat_event_id_chat_events_id_fk", + "columns": [ + "chat_event_id" + ], + "tableTo": "chat_events", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_event_people", + "name": "fk_chat_event_people_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_events", + "name": "fk_chat_events_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_events", + "name": "fk_chat_events_actor_identity_id_identities_id_fk", + "columns": [ + "actor_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_members", + "name": "fk_chat_members_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chat_members", + "name": "fk_chat_members_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chats", + "name": "fk_chats_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chats", + "name": "fk_chats_parent_chat_id_chats_id_fk", + "columns": [ + "parent_chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunk_messages", + "name": "fk_chunk_messages_chunk_id_chunks_id_fk", + "columns": [ + "chunk_id" + ], + "tableTo": "chunks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunk_messages", + "name": "fk_chunk_messages_first_message_id_messages_id_fk", + "columns": [ + "first_message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunk_messages", + "name": "fk_chunk_messages_last_message_id_messages_id_fk", + "columns": [ + "last_message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunks", + "name": "fk_chunks_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "chunks", + "name": "fk_chunks_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_authors", + "name": "fk_content_authors_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_channels", + "name": "fk_content_channels_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_metrics", + "name": "fk_content_metrics_post_id_content_posts_id_fk", + "columns": [ + "post_id" + ], + "tableTo": "content_posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_post_revisions", + "name": "fk_content_post_revisions_post_id_content_posts_id_fk", + "columns": [ + "post_id" + ], + "tableTo": "content_posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_posts", + "name": "fk_content_posts_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_terms", + "name": "fk_content_terms_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "content_terms", + "name": "fk_content_terms_tag_id_canonical_tags_id_fk", + "columns": [ + "tag_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "contracts", + "name": "fk_contracts_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "contracts", + "name": "fk_contracts_deal_id_deals_id_fk", + "columns": [ + "deal_id" + ], + "tableTo": "deals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_messages", + "name": "fk_conversation_messages_conversation_id_conversations_id_fk", + "columns": [ + "conversation_id" + ], + "tableTo": "conversations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_messages", + "name": "fk_conversation_messages_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_readiness", + "name": "fk_conversation_readiness_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversation_state", + "name": "fk_conversation_state_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversations", + "name": "fk_conversations_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "conversations", + "name": "fk_conversations_first_message_id_messages_id_fk", + "columns": [ + "first_message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "crm_fields", + "name": "fk_crm_fields_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "crm_files", + "name": "fk_crm_files_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_stage_id_pipeline_stages_id_fk", + "columns": [ + "stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "deals", + "name": "fk_deals_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "decisions", + "name": "fk_decisions_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "decisions", + "name": "fk_decisions_supersedes_id_decisions_id_fk", + "columns": [ + "supersedes_id" + ], + "tableTo": "decisions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "document_revisions", + "name": "fk_document_revisions_document_id_documents_id_fk", + "columns": [ + "document_id" + ], + "tableTo": "documents", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "documents", + "name": "fk_documents_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_locations", + "name": "fk_email_locations_mailbox_id_mailboxes_id_fk", + "columns": [ + "mailbox_id" + ], + "tableTo": "mailboxes", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_locations", + "name": "fk_email_locations_email_id_emails_id_fk", + "columns": [ + "email_id" + ], + "tableTo": "emails", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_mailboxes", + "name": "fk_email_mailboxes_email_id_emails_id_fk", + "columns": [ + "email_id" + ], + "tableTo": "emails", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_mailboxes", + "name": "fk_email_mailboxes_mailbox_id_mailboxes_id_fk", + "columns": [ + "mailbox_id" + ], + "tableTo": "mailboxes", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_recipients", + "name": "fk_email_recipients_email_id_emails_id_fk", + "columns": [ + "email_id" + ], + "tableTo": "emails", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_recipients", + "name": "fk_email_recipients_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "email_threads", + "name": "fk_email_threads_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "emails", + "name": "fk_emails_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "emails", + "name": "fk_emails_email_thread_id_email_threads_id_fk", + "columns": [ + "email_thread_id" + ], + "tableTo": "email_threads", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "emails", + "name": "fk_emails_from_identity_id_identities_id_fk", + "columns": [ + "from_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "events", + "name": "fk_events_event_series_id_event_series_id_fk", + "columns": [ + "event_series_id" + ], + "tableTo": "event_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "facts", + "name": "fk_facts_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "facts", + "name": "fk_facts_supersedes_id_facts_id_fk", + "columns": [ + "supersedes_id" + ], + "tableTo": "facts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "fetch_leases", + "name": "fk_fetch_leases_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "files", + "name": "fk_files_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "files", + "name": "fk_files_parent_id_files_id_fk", + "columns": [ + "parent_id" + ], + "tableTo": "files", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "files", + "name": "fk_files_document_id_documents_id_fk", + "columns": [ + "document_id" + ], + "tableTo": "documents", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "financial_transactions", + "name": "fk_financial_transactions_financial_account_id_financial_accounts_id_fk", + "columns": [ + "financial_account_id" + ], + "tableTo": "financial_accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "financial_transactions", + "name": "fk_financial_transactions_payment_id_payments_id_fk", + "columns": [ + "payment_id" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "financial_transactions", + "name": "fk_financial_transactions_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_link_events", + "name": "fk_identity_link_events_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_link_events", + "name": "fk_identity_link_events_from_person_id_persons_id_fk", + "columns": [ + "from_person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_link_events", + "name": "fk_identity_link_events_to_person_id_persons_id_fk", + "columns": [ + "to_person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_links", + "name": "fk_identity_links_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_links", + "name": "fk_identity_links_person_id_persons_id_fk", + "columns": [ + "person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "identity_revisions", + "name": "fk_identity_revisions_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoice_lines", + "name": "fk_invoice_lines_invoice_id_invoices_id_fk", + "columns": [ + "invoice_id" + ], + "tableTo": "invoices", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoice_lines", + "name": "fk_invoice_lines_catalog_item_id_catalog_items_id_fk", + "columns": [ + "catalog_item_id" + ], + "tableTo": "catalog_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoices", + "name": "fk_invoices_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoices", + "name": "fk_invoices_contract_id_contracts_id_fk", + "columns": [ + "contract_id" + ], + "tableTo": "contracts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "invoices", + "name": "fk_invoices_subscription_id_subscriptions_id_fk", + "columns": [ + "subscription_id" + ], + "tableTo": "subscriptions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_person_id_persons_id_fk", + "columns": [ + "person_id" + ], + "tableTo": "persons", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "involvements", + "name": "fk_involvements_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_stage_id_pipeline_stages_id_fk", + "columns": [ + "stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_deal_id_deals_id_fk", + "columns": [ + "deal_id" + ], + "tableTo": "deals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "leads", + "name": "fk_leads_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "mail_rules", + "name": "fk_mail_rules_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "mailboxes", + "name": "fk_mailboxes_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_chat_messages", + "name": "fk_meeting_chat_messages_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_chat_messages", + "name": "fk_meeting_chat_messages_sender_participant_id_meeting_participants_id_fk", + "columns": [ + "sender_participant_id" + ], + "tableTo": "meeting_participants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_participants", + "name": "fk_meeting_participants_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_participants", + "name": "fk_meeting_participants_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_series", + "name": "fk_meeting_series_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_series", + "name": "fk_meeting_series_event_series_id_event_series_id_fk", + "columns": [ + "event_series_id" + ], + "tableTo": "event_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_series", + "name": "fk_meeting_series_host_identity_id_identities_id_fk", + "columns": [ + "host_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_summaries", + "name": "fk_meeting_summaries_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_transcript_rows", + "name": "fk_meeting_transcript_rows_meeting_transcript_id_meeting_transcripts_id_fk", + "columns": [ + "meeting_transcript_id" + ], + "tableTo": "meeting_transcripts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_transcript_rows", + "name": "fk_meeting_transcript_rows_speaker_participant_id_meeting_participants_id_fk", + "columns": [ + "speaker_participant_id" + ], + "tableTo": "meeting_participants", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meeting_transcripts", + "name": "fk_meeting_transcripts_meeting_id_meetings_id_fk", + "columns": [ + "meeting_id" + ], + "tableTo": "meetings", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_meeting_series_id_meeting_series_id_fk", + "columns": [ + "meeting_series_id" + ], + "tableTo": "meeting_series", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_event_id_events_id_fk", + "columns": [ + "event_id" + ], + "tableTo": "events", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "meetings", + "name": "fk_meetings_host_identity_id_identities_id_fk", + "columns": [ + "host_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_counts", + "name": "fk_member_counts_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observation_members", + "name": "fk_member_observation_members_member_observation_id_member_observations_id_fk", + "columns": [ + "member_observation_id" + ], + "tableTo": "member_observations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observation_members", + "name": "fk_member_observation_members_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observation_members", + "name": "fk_member_observation_members_member_stay_id_member_stays_id_fk", + "columns": [ + "member_stay_id" + ], + "tableTo": "member_stays", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_observations", + "name": "fk_member_observations_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_stays", + "name": "fk_member_stays_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_stays", + "name": "fk_member_stays_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "member_stays", + "name": "fk_member_stays_invited_by_identity_id_identities_id_fk", + "columns": [ + "invited_by_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "memories", + "name": "fk_memories_supersedes_id_memories_id_fk", + "columns": [ + "supersedes_id" + ], + "tableTo": "memories", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "memories", + "name": "fk_memories_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_counter_observations", + "name": "fk_message_counter_observations_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_links", + "name": "fk_message_links_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_links", + "name": "fk_message_links_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_links", + "name": "fk_message_links_parent_id_messages_id_fk", + "columns": [ + "parent_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_reactions", + "name": "fk_message_reactions_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_reactions", + "name": "fk_message_reactions_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_revisions", + "name": "fk_message_revisions_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_transcripts", + "name": "fk_message_transcripts_message_id_messages_id_fk", + "columns": [ + "message_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "message_transcripts", + "name": "fk_message_transcripts_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_sender_identity_id_identities_id_fk", + "columns": [ + "sender_identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "messages", + "name": "fk_messages_thread_root_id_messages_id_fk", + "columns": [ + "thread_root_id" + ], + "tableTo": "messages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "note_revisions", + "name": "fk_note_revisions_note_id_notes_id_fk", + "columns": [ + "note_id" + ], + "tableTo": "notes", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "order_lines", + "name": "fk_order_lines_order_id_orders_id_fk", + "columns": [ + "order_id" + ], + "tableTo": "orders", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "order_lines", + "name": "fk_order_lines_catalog_item_id_catalog_items_id_fk", + "columns": [ + "catalog_item_id" + ], + "tableTo": "catalog_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_invoice_id_invoices_id_fk", + "columns": [ + "invoice_id" + ], + "tableTo": "invoices", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_payment_id_payments_id_fk", + "columns": [ + "payment_id" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_contract_id_contracts_id_fk", + "columns": [ + "contract_id" + ], + "tableTo": "contracts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "orders", + "name": "fk_orders_deal_id_deals_id_fk", + "columns": [ + "deal_id" + ], + "tableTo": "deals", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "organization_identities", + "name": "fk_organization_identities_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "organization_identities", + "name": "fk_organization_identities_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payment_allocations", + "name": "fk_payment_allocations_payment_id_payments_id_fk", + "columns": [ + "payment_id" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payment_allocations", + "name": "fk_payment_allocations_invoice_id_invoices_id_fk", + "columns": [ + "invoice_id" + ], + "tableTo": "invoices", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payments", + "name": "fk_payments_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payments", + "name": "fk_payments_refund_of_payments_id_fk", + "columns": [ + "refund_of" + ], + "tableTo": "payments", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "payments", + "name": "fk_payments_subscription_id_subscriptions_id_fk", + "columns": [ + "subscription_id" + ], + "tableTo": "subscriptions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stage_changes", + "name": "fk_pipeline_stage_changes_pipeline_id_pipelines_id_fk", + "columns": [ + "pipeline_id" + ], + "tableTo": "pipelines", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stage_changes", + "name": "fk_pipeline_stage_changes_from_stage_id_pipeline_stages_id_fk", + "columns": [ + "from_stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stage_changes", + "name": "fk_pipeline_stage_changes_to_stage_id_pipeline_stages_id_fk", + "columns": [ + "to_stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stages", + "name": "fk_pipeline_stages_pipeline_id_pipelines_id_fk", + "columns": [ + "pipeline_id" + ], + "tableTo": "pipelines", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipeline_stages", + "name": "fk_pipeline_stages_base_stage_id_pipeline_stages_id_fk", + "columns": [ + "base_stage_id" + ], + "tableTo": "pipeline_stages", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "pipelines", + "name": "fk_pipelines_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "poll_votes", + "name": "fk_poll_votes_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "poll_votes", + "name": "fk_poll_votes_identity_id_identities_id_fk", + "columns": [ + "identity_id" + ], + "tableTo": "identities", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "projects", + "name": "fk_projects_organization_id_organizations_id_fk", + "columns": [ + "organization_id" + ], + "tableTo": "organizations", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "projects", + "name": "fk_projects_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "proposed_actions", + "name": "fk_proposed_actions_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "record_relations", + "name": "fk_record_relations_record_id_records_id_fk", + "columns": [ + "record_id" + ], + "tableTo": "records", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "record_relations", + "name": "fk_record_relations_target_id_records_id_fk", + "columns": [ + "target_id" + ], + "tableTo": "records", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "records", + "name": "fk_records_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "reminders", + "name": "fk_reminders_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "reminders", + "name": "fk_reminders_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscription_prices", + "name": "fk_subscription_prices_subscription_id_subscriptions_id_fk", + "columns": [ + "subscription_id" + ], + "tableTo": "subscriptions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscriptions", + "name": "fk_subscriptions_catalog_item_id_catalog_items_id_fk", + "columns": [ + "catalog_item_id" + ], + "tableTo": "catalog_items", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscriptions", + "name": "fk_subscriptions_contract_id_contracts_id_fk", + "columns": [ + "contract_id" + ], + "tableTo": "contracts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "subscriptions", + "name": "fk_subscriptions_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "sync_cursors", + "name": "fk_sync_cursors_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "sync_ranges", + "name": "fk_sync_ranges_chat_id_chats_id_fk", + "columns": [ + "chat_id" + ], + "tableTo": "chats", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "syncs", + "name": "fk_syncs_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_consolidations", + "name": "fk_tag_consolidations_source_id_canonical_tags_id_fk", + "columns": [ + "source_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_consolidations", + "name": "fk_tag_consolidations_survivor_id_canonical_tags_id_fk", + "columns": [ + "survivor_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_redirects", + "name": "fk_tag_redirects_source_id_canonical_tags_id_fk", + "columns": [ + "source_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tag_redirects", + "name": "fk_tag_redirects_survivor_id_canonical_tags_id_fk", + "columns": [ + "survivor_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "taggings", + "name": "fk_taggings_tag_id_tags_id_fk", + "columns": [ + "tag_id" + ], + "tableTo": "canonical_tags", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_assignments", + "name": "fk_task_assignments_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_events", + "name": "fk_task_events_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_pairs", + "name": "fk_task_pairs_task_id_tasks_id_fk", + "columns": [ + "task_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "task_pairs", + "name": "fk_task_pairs_other_id_tasks_id_fk", + "columns": [ + "other_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tasks", + "name": "fk_tasks_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tasks", + "name": "fk_tasks_parent_id_tasks_id_fk", + "columns": [ + "parent_id" + ], + "tableTo": "tasks", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "tracker_items", + "name": "fk_tracker_items_account_id_accounts_id_fk", + "columns": [ + "account_id" + ], + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "transaction_splits", + "name": "fk_transaction_splits_transaction_id_financial_transactions_id_fk", + "columns": [ + "transaction_id" + ], + "tableTo": "financial_transactions", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "transaction_splits", + "name": "fk_transaction_splits_project_id_projects_id_fk", + "columns": [ + "project_id" + ], + "tableTo": "projects", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "nameExplicit": false, + "entityType": "fks" + }, + { + "table": "account_identities", + "name": "account_identities_pk", + "columns": [ + "account_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "canonical_auto_tag_claims", + "name": "auto_tag_claims_pk", + "columns": [ + "chat_id", + "tag_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_event_people", + "name": "chat_event_people_pk", + "columns": [ + "chat_event_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_members", + "name": "chat_members_pk", + "columns": [ + "chat_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversation_messages", + "name": "conversation_messages_pk", + "columns": [ + "conversation_id", + "message_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversation_readiness", + "name": "conversation_readiness_pk", + "columns": [ + "chat_id", + "model" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_annotation_transfers", + "name": "document_annotation_transfers_pk", + "columns": [ + "source_key", + "collection" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_index_pending", + "name": "document_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_index_pending", + "name": "email_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_locations", + "name": "email_locations_pk", + "columns": [ + "mailbox_id", + "uidvalidity", + "uid" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_mailboxes", + "name": "email_mailboxes_pk", + "columns": [ + "email_id", + "mailbox_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "embeddings", + "name": "embeddings_pk", + "columns": [ + "model", + "content_hash" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "enrichments", + "name": "enrichments_pk", + "columns": [ + "subject_type", + "subject_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "event_index_pending", + "name": "event_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "fetch_leases", + "name": "fetch_leases_pk", + "columns": [ + "chat_id", + "anchor" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "involvement_pending", + "name": "involvement_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_index_pending", + "name": "meeting_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_counts", + "name": "member_counts_pk", + "columns": [ + "chat_id", + "date" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_observation_members", + "name": "member_observation_members_pk", + "columns": [ + "member_observation_id", + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "memory_index_pending", + "name": "memory_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mention_pending", + "name": "mention_pending_pk", + "columns": [ + "source_type", + "source_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_counter_observations", + "name": "message_counter_observations_pk", + "columns": [ + "message_id", + "counter" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "note_index_pending", + "name": "note_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sync_cursors", + "name": "sync_cursors_pk", + "columns": [ + "account_id", + "key" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sync_ranges", + "name": "sync_ranges_pk", + "columns": [ + "chat_id", + "from_key" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "task_index_pending", + "name": "task_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "templates", + "name": "templates_pk", + "columns": [ + "key", + "channel", + "language" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "transcript_index_pending", + "name": "transcript_index_pending_pk", + "columns": [ + "indexable_type", + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "accounts", + "name": "accounts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "agent_actions", + "name": "agent_actions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "aliases", + "name": "aliases_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "attachments", + "name": "attachments_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "bot_updates", + "name": "bot_updates_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "bots", + "name": "bots_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendar_entries", + "name": "calendar_entries_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendar_entry_participants", + "name": "calendar_entry_participants_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendar_entry_revisions", + "name": "calendar_entry_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "calendars", + "name": "calendars_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "canonical_tags", + "name": "tags_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "catalog_items", + "name": "catalog_items_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_events", + "name": "chat_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_revision_source", + "name": "chat_revision_source_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chat_revisions", + "name": "chat_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chats", + "name": "chats_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chunk_messages", + "name": "chunk_messages_pk", + "columns": [ + "chunk_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "chunks", + "name": "chunks_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_authors", + "name": "content_authors_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_channels", + "name": "content_channels_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_metrics", + "name": "content_metrics_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_post_revisions", + "name": "content_post_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_posts", + "name": "content_posts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "content_terms", + "name": "content_terms_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "contracts", + "name": "contracts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversation_state", + "name": "conversation_state_pk", + "columns": [ + "chat_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "conversations", + "name": "conversations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "crm_fields", + "name": "crm_fields_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "crm_files", + "name": "crm_files_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "deals", + "name": "deals_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "decision_requests", + "name": "decision_requests_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "decisions", + "name": "decisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_changes", + "name": "document_changes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "document_revisions", + "name": "document_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "documents", + "name": "documents_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_recipients", + "name": "email_recipients_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "email_threads", + "name": "email_threads_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "emails", + "name": "emails_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "entity_link_events", + "name": "entity_link_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "event_series", + "name": "event_series_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "events", + "name": "events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "fact_removals", + "name": "fact_removals_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "facts", + "name": "facts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "files", + "name": "files_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "financial_accounts", + "name": "financial_accounts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "financial_transactions", + "name": "financial_transactions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identities", + "name": "identities_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identity_link_events", + "name": "identity_link_events_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identity_links", + "name": "identity_links_pk", + "columns": [ + "identity_id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "identity_revisions", + "name": "identity_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "invoice_lines", + "name": "invoice_lines_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "invoices", + "name": "invoices_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "involvements", + "name": "involvements_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "leads", + "name": "leads_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "link_reviews", + "name": "link_reviews_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "link_revisions", + "name": "link_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "links", + "name": "links_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mail_rules", + "name": "mail_rules_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mailboxes", + "name": "mailboxes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_chat_messages", + "name": "meeting_chat_messages_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_participants", + "name": "meeting_participants_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_series", + "name": "meeting_series_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_summaries", + "name": "meeting_summaries_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_transcript_rows", + "name": "meeting_transcript_rows_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meeting_transcripts", + "name": "meeting_transcripts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "meetings", + "name": "meetings_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_observations", + "name": "member_observations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "member_stays", + "name": "member_stays_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "memories", + "name": "memories_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "mentions", + "name": "mentions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_links", + "name": "message_links_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_reactions", + "name": "message_reactions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_revisions", + "name": "message_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_stems_pending", + "name": "message_stems_pending_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "message_transcripts", + "name": "message_transcripts_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "messages", + "name": "messages_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "note_revisions", + "name": "note_revisions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "notes", + "name": "notes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "order_lines", + "name": "order_lines_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "orders", + "name": "orders_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "organization_identities", + "name": "organization_identities_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "organizations", + "name": "organizations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "payment_allocations", + "name": "payment_allocations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "payments", + "name": "payments_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "persons", + "name": "persons_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "pipeline_stage_changes", + "name": "pipeline_stage_changes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "pipeline_stages", + "name": "pipeline_stages_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "pipelines", + "name": "pipelines_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "places", + "name": "places_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "poll_votes", + "name": "poll_votes_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "projects", + "name": "projects_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "proposed_actions", + "name": "proposed_actions_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "record_relations", + "name": "record_relations_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "records", + "name": "records_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "reminders", + "name": "reminders_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "search_index_state", + "name": "search_index_state_pk", + "columns": [ + "name" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "searches", + "name": "searches_pk", + "columns": [ + "id" + ], + "nameExplicit": false, + "entityType": "pks" + }, + { + "table": "sender_bot_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 ae627e538..e96cd3df4 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "./update" ], "store": { - "speaks": 73, + "speaks": 74, "minCompatible": 73 } }, diff --git a/scripts/schema/codegen/gen-schema.mjs b/scripts/schema/codegen/gen-schema.mjs index b43caa333..f4c944caa 100644 --- a/scripts/schema/codegen/gen-schema.mjs +++ b/scripts/schema/codegen/gen-schema.mjs @@ -89,6 +89,7 @@ const NAMES = { "persons:id WHERE kind IS NULL": "persons_kind_to_work_out", "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", } const parseKey = (k) => { @@ -113,6 +114,7 @@ const colRef = (c) => { if (desc) return `desc(table.${camel(desc[1])})` const fn = c.match(/^ifnull\((\w+), (0|'')\)$/) if (fn) return `sql\`ifnull(\${table.${camel(fn[1])}}, ${fn[2]})\`` + if (c.includes("(")) return `sql\`${c}\`` return `table.${camel(c)}` } const keyCode = (t, k) => { diff --git a/scripts/schema/sender-bots.mjs b/scripts/schema/sender-bots.mjs new file mode 100644 index 000000000..c27ac4c71 --- /dev/null +++ b/scripts/schema/sender-bots.mjs @@ -0,0 +1,43 @@ +import { c, id, ts } from "./columns.mjs" + +const senderBotsTable = { + name: "sender_bots", + doc: "A program that writes to the owner: a no-reply or alert address, a messenger bot, a service's mail. Not a person, so it is never proposed as the same person, has no ties and is no task's assignee. Its identities are those of the person row it was sorted from, which `people list` shows as `automated`. Not the `bots` table, which holds agents that work here.", + cols: [ + id(), + c("person_id", "integer", { + notnull: true, + unique: true, + note: "the person row whose identities are this bot's; its `person:` uid stays the bot's handle in lists. No foreign key: an older build erasing the person does not know this table, and a trigger drops the bot with it", + }), + c("name", "text", { note: "the owner's name for it; null shows its identities' name" }), + c("organization_id", "integer", { + note: "the organization it sends for; no foreign key, a trigger clears it when the organization row goes", + }), + c("author", "text", { notnull: true, note: "`rules` or `owner`: the owner's bot never goes back by a rule" }), + c("reason", "text", { note: "what sorted it: the kind signals, such as `no-reply`, or the owner's words" }), + ...ts(), + ], +} + +const senderBotMovesTable = { + name: "sender_bot_moves", + doc: "Every move of an identity between a person and a sender bot, by the rules or by the owner. An identity whose latest move is the owner's is never moved by a rule again. A trigger drops an identity's rows with it.", + cols: [ + id(), + c("identity_id", "integer", { + notnull: true, + note: "no foreign key: an older build purging an account does not know this table", + }), + c("from_person_id", "integer", { note: "the person it left, or null" }), + c("from_bot_id", "integer", { note: "the sender bot it left, or null" }), + c("to_person_id", "integer", { note: "the person it went to, or null" }), + c("to_bot_id", "integer", { note: "the sender bot it went to, or null" }), + c("author", "text", { notnull: true, note: "`rules` or `owner`" }), + c("reason", "text", { note: "the kind signals of a rule's move, or the owner's words" }), + c("created_at", "integer", { notnull: true, note: "when it moved" }), + ], + keys: ["INDEX (identity_id)"], +} + +export const senderBotTables = [senderBotsTable, senderBotMovesTable] diff --git a/scripts/schema/spec.mjs b/scripts/schema/spec.mjs index de5c75649..70399b6cd 100644 --- a/scripts/schema/spec.mjs +++ b/scripts/schema/spec.mjs @@ -11,6 +11,7 @@ import { enrichmentTables } from "./enrichments.mjs" import { financeTables } from "./finance.mjs" import { recordTables } from "./records.mjs" import { linkRevisionsTable, RELATIONSHIP_KEY, relationshipColumns } from "./relationships.mjs" +import { senderBotTables } from "./sender-bots.mjs" import { tagConsolidationTables, taggingTable } from "./tag-consolidations.mjs" import { templateSection } from "./templates.mjs" import { trackerTables } from "./tracker.mjs" @@ -614,6 +615,7 @@ const NEW = { ...ts(), ], }, + ...senderBotTables, ], mail: [ { @@ -671,6 +673,7 @@ const NEW = { "UNIQUE (account_id, external_id)", "INDEX (account_id, sent_at DESC)", "INDEX (mail_rule_id) WHERE mail_rule_id IS NOT NULL", + `INDEX (coalesce(json_extract(headers, '$."list-id"'), json_extract(metadata, '$.listId')))`, ], }, { diff --git a/src/domain/person-kinds.ts b/src/domain/person-kinds.ts index 659990ae3..d13b6865d 100644 --- a/src/domain/person-kinds.ts +++ b/src/domain/person-kinds.ts @@ -23,6 +23,7 @@ export type KindSignal = | "company-name" | "no-tie" | "no-name" + | "owner-choice" const AUTOMATED_WORDS = new Set([ "noreply", diff --git a/src/errors/reasons.ts b/src/errors/reasons.ts index 50803ea61..2781c5134 100644 --- a/src/errors/reasons.ts +++ b/src/errors/reasons.ts @@ -682,7 +682,7 @@ const OTHERS: Entry[] = [ [ "identity.owner-only", "permission_error", - "only the owner undoes a merge, splits a person, confirms or undoes a link, or links an identity to themselves", + "only the owner undoes or confirms a merge, a split or a link, links an identity to themselves, or moves a sender", ], [ "identity.stale", @@ -726,6 +726,10 @@ const OTHERS: Entry[] = [ validation("identity.common-name", "more than six people have the name, so it proposes no one"), validation("identity.not-a-person", "a bot, a program or an organization is never proposed as a person by name"), validation("identity.owner", "one side is the owner's person, and only the owner joins anyone to themselves"), + ["sender-bot.not-found", "not_found", "no sender bot has that id; people list kind:automated lists them"], + validation("sender-bot.owner", "the owner's own person is never a bot"), + validation("sender-bot.not-a-person", "the person named is a sender bot; name a person"), + validation("sender-bot.assignee", "a sender bot is no one's assignee; move it to a person first"), validation("identity.shared-email", "more than six people share the address, so it proposes no one"), validation("identity-link.dedicated-review", "an identity link is staged and decided through the people review"), validation("identity-split.dedicated-review", "a split of a person is staged and decided through the people review"), diff --git a/src/mail/own.test.ts b/src/mail/own.test.ts index 65244d4b2..e8eb81f9c 100644 --- a/src/mail/own.test.ts +++ b/src/mail/own.test.ts @@ -81,6 +81,23 @@ describe("the owner's mail", () => { expect(await ownerHolds(store, ALIAS)).toBe(true) }) + it("works out again the kind of someone the alias wrote to before the alias was known as the owner's", async () => { + const store = await sandbox() + const toPat = { + from: ["Owner Example", ALIAS] as [string, string], + to: [["Pat Lane", "pat@lane.ru"]] as [string, string][], + } + await sync(store, { messages: [mail(3), mail(1, toPat)] }) + const kindOfPat = async () => + (await store.people.list({ limit: 100, kind: "all" })).items.find(({ email }) => email === "pat@lane.ru")?.kind + + expect(await kindOfPat()).toBe("stranger") + await sync(store, { messages: [mail(3), mail(1, toPat), mail(2, { ...toPat, labels: ["Sent"] })] }) + + expect(await ownerHolds(store, ALIAS)).toBe(true) + expect(await kindOfPat()).toBe("person") + }) + it("reads an IMAP account's Sent folder by the source's word and stores mail in INBOX and Sent once", async () => { const store = await sandbox() const box: FakeMailbox = { diff --git a/src/store/areas.ts b/src/store/areas.ts index 40a0cb73c..67c3b3dc1 100644 --- a/src/store/areas.ts +++ b/src/store/areas.ts @@ -43,6 +43,7 @@ export type { ProductFilter } from "./sqlite/products.js" export { PROPOSAL_STATUSES, type ProposedAction } from "./sqlite/proposed-actions.js" export type { MatchRun, RecordKey } from "./sqlite/records.js" export type { RelationListItem } from "./sqlite/relation-list.js" +export type { SenderBot } from "./sqlite/sender-bots.js" export type { SubscriptionFilter } from "./sqlite/subscriptions.js" export { PROJECT_TASK_FIELDS, TASK_SORTS, type TaskSort } from "./sqlite/task-board.js" export { TASK_RELATION_KINDS, type TaskRelationKind } from "./sqlite/task-relations.js" diff --git a/src/store/index.ts b/src/store/index.ts index 4d01d870a..fb4486deb 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -503,6 +503,7 @@ export { type SearchIndexState, searchIndexState, } from "./sqlite/search-index.js" +export type { SenderBot } from "./sqlite/sender-bots.js" export { REACHES, type Reach, type SenderSignal } from "./sqlite/sender-signals.js" export type { ChallengeInput, SourceReviewDecision } from "./sqlite/source-review.js" export type { diff --git a/src/store/people.ts b/src/store/people.ts index 6b13b61d2..39ae4277e 100644 --- a/src/store/people.ts +++ b/src/store/people.ts @@ -51,12 +51,14 @@ import * as personLinks from "./sqlite/person-links.js" import { linkPhones, PROPOSAL_SCORE, RULE, scanMatches } from "./sqlite/person-match-scan.js" import type { PersonMerge } from "./sqlite/person-merges.js" import * as personMerges from "./sqlite/person-merges.js" +import { ownerOnly } from "./sqlite/person-merges.js" import { type PersonPreparationRead, personPreparation } from "./sqlite/person-preparation.js" import { personSeenInAccounts } from "./sqlite/person-scope.js" import { type ShownBecause, shownReasons } from "./sqlite/person-ties.js" import type { PrivateContact, PrivateContactNote } from "./sqlite/private-people.js" import * as privatePeople from "./sqlite/private-people.js" import type { ProposedAction } from "./sqlite/proposed-actions.js" +import { moveToBot, moveToPerson, type SenderBot, senderBotsOf } from "./sqlite/sender-bots.js" import { write } from "./sqlite/transaction.js" import type { AccountKey, @@ -232,8 +234,29 @@ export interface PeopleStore extends AccountPeople { counts(query?: string): Promise> /** People whose names start like the typed one, the same name first: for a form that adds a person. */ similar(name: string, options?: { limit?: number }): Promise - /** Why each `person:` is shown by default, as `list` gives it; an empty list for one with no tie. */ + /** Why each `person:` is shown by default, as `list` gives it; an empty list for one with no tie, or a bot. */ ties(people: readonly string[]): Promise> + /** + * The owner says a sender is a program: a person (`person:`) or one identity moves to a sender bot for its + * whole history, listed as `automated` under its person row's ref, and no rule moves it back. One identity of a person + * with others gets a person row of its own; `bot` (`sender-bot:`) joins a stored bot instead. The owner's alone; + * refused for the owner's own person. + */ + moveToBot( + subject: string | IdentityRef, + by: Decider, + options?: { bot?: string; name?: string; reason?: string }, + ): Promise + /** + * The owner says a sender is a person: a bot (`sender-bot:` or its `person:`), or one identity of it, moves + * to a person for its whole history, and no rule makes it a bot again. Said of a person who is no bot, it keeps them + * a person. `person` joins that person instead. The owner's alone. + */ + moveToPerson( + subject: string | IdentityRef, + by: Decider, + options?: { person?: string; reason?: string }, + ): Promise } export const accountPeopleOver = (context: StoreContext): AccountPeople => { @@ -393,7 +416,21 @@ export const peopleStoreOver = (context: StoreContext, keyed: AccountPeople): Pe similar: async (name, { limit = 8 } = {}) => similarPeople(database, name, limit), ties: async (people) => { const reasons = shownReasons(database) - return Object.fromEntries(people.map((ref) => [ref, reasons.get(Number(ref.replace(/^person:/, ""))) ?? []])) + const bots = senderBotsOf(database) + return Object.fromEntries( + people.map((ref) => { + const id = Number(ref.replace(/^person:/, "")) + return [ref, bots.has(id) ? [] : (reasons.get(id) ?? [])] + }), + ) + }, + moveToBot: async (subject, by, options) => { + ownerOnly(by, "moves a sender to a bot") + return moveToBot(context, subject, options) + }, + moveToPerson: async (subject, by, options) => { + ownerOnly(by, "moves a sender to a person") + return moveToPerson(context, subject, options) }, } } diff --git a/src/store/sender-bots.test.ts b/src/store/sender-bots.test.ts new file mode 100644 index 000000000..7a603da65 --- /dev/null +++ b/src/store/sender-bots.test.ts @@ -0,0 +1,279 @@ +import { mkdtempSync } from "node:fs" +import { tmpdir } from "node:os" +import { join } from "node:path" +import { afterEach, expect, it } from "vitest" +import { rollBackTo } from "../testing/older-store.js" +import type { CacheDatabase } from "./driver.js" +import { openCache } from "./open.js" +import { LIST_SENDERS } from "./sqlite/sender-signals.js" +import { type AccountKey, type MessageStore, openStore } from "./store.js" + +const TG: AccountKey = { provider: "telegram", account: "1" } +const MAIL: AccountKey = { provider: "email", account: "me@acme.ru" } +const CRM: AccountKey = { provider: "bitrix24", account: "portal" } + +const handles: { close(): unknown }[] = [] +afterEach(async () => { + for (const handle of handles.splice(0)) await handle.close() +}) + +const opened = async (path = join(mkdtempSync(join(tmpdir(), "sender-bots-")), "store.db")) => { + const store = await openStore({ path }) + handles.push(store) + await store.people.savePeople(TG, [{ id: "1", name: "Me" }]) + await store.people.linkToOwner({ provider: "telegram", id: "1" }) + await store.accounts.saveAccount(MAIL, { name: null }) + const db = await openCache(path) + handles.push(db) + return { store, db, path } +} + +const uidOf = async (store: MessageStore, provider: string, id: string) => + `person:${(await store.people.personOf({ provider, id }))?.uid}` + +const automated = async (store: MessageStore) => + (await store.people.list({ limit: 100, kind: "automated" })).items.map(({ person, displayName, bot, ties }) => ({ + person, + displayName, + bot, + ties, + })) + +const moves = (db: CacheDatabase) => + db.prepare("SELECT from_person_id, from_bot_id, to_person_id, to_bot_id, author, reason FROM sender_bot_moves").all() + +it("moves a program's address to a bot, lists it as automated under its person ref, and a sync keeps it there", async () => { + const { store, db } = await opened() + await store.people.savePeople(MAIL, [ + { id: "noreply-4471@bank.ru", name: "Bank" }, + { id: "lena@acme.ru", name: "Lena Marsh" }, + ]) + await store.people.savePeople(TG, [ + { id: "50", name: "Helper", isBot: true }, + { id: "51", name: "Weather Notifications" }, + ]) + const bank = await uidOf(store, "email", "noreply-4471@bank.ru") + const helper = await uidOf(store, "telegram", "50") + + const listed = await automated(store) + + expect(listed).toEqual( + expect.arrayContaining([ + { person: bank, displayName: "Bank", bot: expect.stringMatching(/^sender-bot:\d+$/), ties: [] }, + { person: helper, displayName: "Helper", bot: expect.stringMatching(/^sender-bot:\d+$/), ties: [] }, + // A name alone may be a human's newsletter: marked, not moved. + { person: await uidOf(store, "telegram", "51"), displayName: "Weather Notifications", bot: null, ties: [] }, + ]), + ) + expect(listed).toHaveLength(3) + expect(moves(db)).toEqual( + expect.arrayContaining([expect.objectContaining({ author: "rules", reason: "no-reply", to_person_id: null })]), + ) + const before = db.prepare("SELECT id, person_id, author FROM sender_bots ORDER BY id").all() + + await store.people.savePeople(MAIL, [{ id: "noreply-4471@bank.ru", name: "Bank" }]) + await store.people.savePeople(TG, [{ id: "50", name: "Helper", isBot: true }]) + + expect(await automated(store)).toEqual(listed) + expect(db.prepare("SELECT id, person_id, author FROM sender_bots ORDER BY id").all()).toEqual(before) + expect((await store.people.list({ limit: 0, kind: "automated" })).counts.automated).toBe(3) + expect(await store.people.ties([bank])).toEqual({ [bank]: [] }) + expect((await store.people.similar("Bank")).map(({ person }) => person)).not.toContain(bank) +}) + +it("keeps the owner's choice both ways, through the rules and a change of them, and logs each move", async () => { + const { store, db } = await opened() + await store.people.savePeople(MAIL, [ + { id: "alerts@shop.ru", name: "Shop" }, + { id: "noreply@bank.ru", name: "Bank" }, + ]) + const shop = await uidOf(store, "email", "alerts@shop.ru") + const bank = await uidOf(store, "email", "noreply@bank.ru") + await store.people.list({ limit: 0 }) + + await expect(store.people.moveToBot(shop, { bot: "agent", reason: "guess" })).rejects.toMatchObject({ + details: { reason: "identity.owner-only" }, + }) + const shopBot = await store.people.moveToBot(shop, "owner", { name: "Shop alerts", reason: "a program" }) + const bankPerson = await store.people.moveToPerson(bank, "owner", { reason: "my banker writes from it" }) + db.prepare("UPDATE store_settings SET value = '6' WHERE key = 'people.kind_rules'").run() + + expect(shopBot).toMatchObject({ person: shop, name: "Shop alerts", author: "owner" }) + expect(await automated(store)).toEqual([{ person: shop, displayName: "Shop alerts", bot: shopBot.bot, ties: [] }]) + expect(bankPerson.uid).toBe(bank.replace("person:", "")) + const listed = (await store.people.list({ limit: 100, kind: "all" })).items.find(({ person }) => person === bank) + expect(listed).toMatchObject({ kind: "organization", bot: null }) + + const back = await store.people.moveToPerson(shopBot.bot, "owner") + expect(`person:${back.uid}`).toBe(shop) + expect(await automated(store)).toEqual([]) + expect(db.prepare("SELECT count(*) AS n FROM sender_bots").get()).toEqual({ n: 0 }) + expect( + moves(db) + .filter(({ author }) => author === "owner") + .map(({ to_bot_id, to_person_id }) => [to_bot_id !== null, to_person_id !== null]), + ).toEqual([ + [true, false], + [false, true], + [false, true], + ]) + await expect(store.people.moveToBot("person:1", "owner")).rejects.toMatchObject({ + details: { reason: "sender-bot.owner" }, + }) +}) + +it("moves one identity of a person with others to a bot of its own, and into a bot already stored", async () => { + const { store } = await opened() + await store.people.savePeople(TG, [ + { id: "60", name: "Ola" }, + { id: "61", name: "Ola" }, + { id: "62", name: "Ola" }, + ]) + await store.people.linkIdentities( + { provider: "telegram", id: "60" }, + { provider: "telegram", id: "61" }, + { method: "manual", by: "owner" }, + ) + await store.people.linkIdentities( + { provider: "telegram", id: "60" }, + { provider: "telegram", id: "62" }, + { method: "manual", by: "owner" }, + ) + const ola = await uidOf(store, "telegram", "60") + + const bot = await store.people.moveToBot({ provider: "telegram", id: "61" }, "owner") + const joined = await store.people.moveToBot({ provider: "telegram", id: "62" }, "owner", { bot: bot.bot }) + + expect(joined.bot).toBe(bot.bot) + expect(bot.person).not.toBe(ola) + expect(await uidOf(store, "telegram", "60")).toBe(ola) + expect(await uidOf(store, "telegram", "61")).toBe(bot.person) + expect(await uidOf(store, "telegram", "62")).toBe(bot.person) + expect((await automated(store)).map(({ person }) => person)).toEqual([bot.person]) + await expect( + store.people.moveToPerson({ provider: "telegram", id: "61" }, "owner", { person: bot.person }), + ).rejects.toMatchObject({ details: { reason: "sender-bot.not-a-person" } }) + + const home = await store.people.moveToPerson({ provider: "telegram", id: "61" }, "owner", { person: ola }) + expect(`person:${home.uid}`).toBe(ola) + expect(await uidOf(store, "telegram", "62")).toBe(bot.person) +}) + +it("never joins a bot to a person by an address, nor makes it a task's assignee", async () => { + const { store, db } = await opened() + await store.people.savePeople(CRM, [{ id: "contact/20", name: "Alice Example", email: "alice@acme.example" }]) + await store.people.savePeople(TG, [{ id: "5", name: "Alice" }]) + const tg = await uidOf(store, "telegram", "5") + await store.people.moveToBot(tg, "owner") + db.prepare( + "UPDATE identities SET email = 'alice@acme.example' WHERE provider = 'telegram' AND external_id = '5'", + ).run() + + const scan = await store.people.scanMatches() + + expect(await uidOf(store, "telegram", "5")).toBe(tg) + expect(scan.merged).toEqual([]) + expect(scan.skipped).toEqual(expect.arrayContaining([expect.objectContaining({ reason: "identity.not-a-person" })])) + await store.knowledge.addProject({ name: "Harbour", key: "HRB", type: "work" }) + const task = await store.tasks.create({ project: "HRB", title: "Ship", type: "chore" }, "owner") + await expect(store.tasks.assign(task.id, { to: tg, role: "assignee" }, "owner")).rejects.toMatchObject({ + details: { reason: "sender-bot.assignee" }, + }) +}) + +it("gives a version 73 store the bot tables and the List-Id index, and moves its programs on the next list", async () => { + const { store, path } = await opened() + await store.people.savePeople(MAIL, [{ id: "no-reply@service.ru", name: "Service" }]) + await store.people.list({ limit: 0 }) + await store.close() + handles.splice(handles.indexOf(store), 1) + const old = await openCache(path) + rollBackTo(old, 74) + old.prepare("UPDATE store_settings SET value = '6' WHERE key = 'people.kind_rules'").run() + expect(old.prepare("SELECT 1 FROM sqlite_master WHERE name = 'sender_bots'").get()).toBeUndefined() + old.close() + + const upgraded = await openStore({ path }) + handles.push(upgraded) + const service = await uidOf(upgraded, "email", "no-reply@service.ru") + + expect((await automated(upgraded)).map(({ person, bot }) => [person, bot?.startsWith("sender-bot:")])).toEqual([ + [service, true], + ]) + const db = await openCache(path) + handles.push(db) + const plan = db + .prepare(`EXPLAIN QUERY PLAN ${LIST_SENDERS}`) + .all('[""]') + .map((row) => String(row.detail)) + expect(plan.join(" ")).toContain("emails_by_list_id") +}) + +it("gives a rule's bot back to a person once the owner writes to it, and logs the rule's move", async () => { + const { store, db } = await opened() + await store.people.savePeople(MAIL, [{ id: "noreply@bank.ru", name: "Bank" }]) + const bank = await uidOf(store, "email", "noreply@bank.ru") + expect((await automated(store)).map(({ person }) => person)).toEqual([bank]) + const account = Number(db.prepare("SELECT id FROM accounts WHERE provider = 'email'").get()?.id) + const at = Date.now() + const thread = db + .prepare( + "INSERT INTO email_threads (account_id, external_id, created_at, updated_at) VALUES (?, 't1', ?, ?) RETURNING id", + ) + .get(account, at, at)?.id as number + const sent = db + .prepare( + "INSERT INTO emails (account_id, email_thread_id, external_id, outgoing, created_at, updated_at) " + + "VALUES (?, ?, 'm1', 1, ?, ?) RETURNING id", + ) + .get(account, thread, at, at)?.id as number + const identity = db.prepare("SELECT id FROM identities WHERE external_id = 'noreply@bank.ru'").get()?.id as number + db.prepare( + "INSERT INTO email_recipients (email_id, identity_id, address, role, position, created_at, updated_at) " + + "VALUES (?, ?, 'noreply@bank.ru', 'to', 0, ?, ?)", + ).run(sent, identity, at, at) + + // Still marked by its address, but the owner wrote to it: a person, not a bot. + expect(await automated(store)).toEqual([{ person: bank, displayName: "Bank", bot: null, ties: ["mail"] }]) + expect(db.prepare("SELECT count(*) AS n FROM sender_bots").get()).toEqual({ n: 0 }) + expect( + moves(db).map(({ author, to_bot_id, to_person_id }) => [author, to_bot_id !== null, to_person_id !== null]), + ).toEqual([ + ["rules", true, false], + ["rules", false, true], + ]) +}) + +it("lets an account purge and a person's erasure take a bot's rows with them", async () => { + const { store, db } = await opened() + await store.people.savePeople(TG, [ + { id: "50", name: "Helper", isBot: true }, + { id: "51", name: "Notifier", isBot: true }, + ]) + await store.people.list({ limit: 0 }) + expect(db.prepare("SELECT count(*) AS n FROM sender_bots").get()).toEqual({ n: 2 }) + + await store.people.erase(await uidOf(store, "telegram", "51"), "owner", { apply: true }) + expect(db.prepare("SELECT count(*) AS n FROM sender_bots").get()).toEqual({ n: 1 }) + await store.accounts.purge(TG) + + expect(db.prepare("SELECT count(*) AS n FROM sender_bots").get()).toEqual({ n: 0 }) + expect(db.prepare("SELECT count(*) AS n FROM sender_bot_moves").get()).toEqual({ n: 0 }) +}) + +it("never proposes a bot as the same person by name", async () => { + const { store } = await opened() + await store.people.savePeople(MAIL, [{ id: "noreply@lane.ru", name: "Pat Lane" }]) + await store.people.savePeople(TG, [{ id: "70", name: "Pat Lane" }]) + const bot = await uidOf(store, "email", "noreply@lane.ru") + await store.people.list({ limit: 0 }) + + const scan = await store.people.scanMatches({ full: true }) + + const named = [ + ...scan.merged.flatMap(({ into, from }) => [into, from]), + ...scan.proposed.flatMap((one) => one.persons), + ] + expect(named).not.toContain(bot.replace("person:", "")) + expect(await uidOf(store, "email", "noreply@lane.ru")).toBe(bot) +}) diff --git a/src/store/sqlite/manifest.ts b/src/store/sqlite/manifest.ts index baec1b4c3..a99c6dd70 100644 --- a/src/store/sqlite/manifest.ts +++ b/src/store/sqlite/manifest.ts @@ -268,6 +268,8 @@ export const MANIFEST: ManifestEntry[] = [ { name: "20261123022342_version-72-document-history", version: 72, minCompatible: 56 }, { name: "20261123022347_version-72-document-changes-trigger", version: 72, minCompatible: 56 }, { name: "20261123230507_version-73-autoincrement", version: 73, minCompatible: 73, tables: V73_TABLES }, + { name: "20261125025700_version-74-sender-bots", version: 74, minCompatible: 73 }, + { name: "20261125025709_version-74-sender-bot-triggers", version: 74, minCompatible: 73 }, ] export const generatedMigrations = ( diff --git a/src/store/sqlite/migrations.generated.ts b/src/store/sqlite/migrations.generated.ts index 396656f30..9a16f4a5e 100644 --- a/src/store/sqlite/migrations.generated.ts +++ b/src/store/sqlite/migrations.generated.ts @@ -2093,5 +2093,26 @@ export const GENERATED: { name: string; statements: string[] }[] = [ "CREATE INDEX `transaction_splits_by_category_folded` ON `transaction_splits` (`category_folded`);", "CREATE INDEX `transaction_splits_by_project_id` ON `transaction_splits` (`project_id`);" ] + }, + { + "name": "20261125025700_version-74-sender-bots", + "statements": [ + "CREATE TABLE `sender_bot_moves` (\n\t`id` integer PRIMARY KEY AUTOINCREMENT,\n\t`identity_id` integer NOT NULL,\n\t`from_person_id` integer,\n\t`from_bot_id` integer,\n\t`to_person_id` integer,\n\t`to_bot_id` integer,\n\t`author` text NOT NULL,\n\t`reason` text,\n\t`created_at` integer NOT NULL\n);", + "CREATE TABLE `sender_bots` (\n\t`id` integer PRIMARY KEY AUTOINCREMENT,\n\t`person_id` integer NOT NULL UNIQUE,\n\t`name` text,\n\t`organization_id` integer,\n\t`author` text NOT NULL,\n\t`reason` text,\n\t`created_at` integer NOT NULL,\n\t`updated_at` integer NOT NULL\n);", + "CREATE INDEX `emails_by_list_id` ON `emails` (coalesce(json_extract(headers, '$.\"list-id\"'), json_extract(metadata, '$.listId')));", + "CREATE INDEX `sender_bot_moves_by_identity_id` ON `sender_bot_moves` (`identity_id`);" + ] + }, + { + "name": "20261125025709_version-74-sender-bot-triggers", + "statements": [ + "-- No foreign keys on the bot tables, so an older build that erases a person or an organization, or purges an account,\n-- still can; these drop or clear their rows with it.\nCREATE TRIGGER sender_bots_person_ad AFTER DELETE ON persons BEGIN\n DELETE FROM sender_bots WHERE person_id = OLD.id;\nEND;", + "CREATE TRIGGER sender_bots_organization_ad AFTER DELETE ON organizations BEGIN\n UPDATE sender_bots SET organization_id = NULL WHERE organization_id = OLD.id;\nEND;", + "CREATE TRIGGER sender_bot_moves_identity_ad AFTER DELETE ON identities BEGIN\n DELETE FROM sender_bot_moves WHERE identity_id = OLD.id;\nEND;", + "CREATE TRIGGER person_kind_sender_bot_ai AFTER INSERT ON sender_bots BEGIN\n UPDATE persons SET kind = NULL WHERE kind IS NOT NULL AND id = NEW.person_id;\nEND;", + "CREATE TRIGGER person_kind_sender_bot_ad AFTER DELETE ON sender_bots BEGIN\n UPDATE persons SET kind = NULL WHERE kind IS NOT NULL AND id = OLD.person_id;\nEND;", + "CREATE TRIGGER person_kind_sender_bot_au AFTER UPDATE OF person_id, author, name ON sender_bots BEGIN\n UPDATE persons SET kind = NULL WHERE kind IS NOT NULL AND id IN (OLD.person_id, NEW.person_id);\nEND;", + "CREATE TRIGGER person_kind_sender_bot_move_ai AFTER INSERT ON sender_bot_moves BEGIN\n UPDATE persons SET kind = NULL WHERE kind IS NOT NULL AND id IN (SELECT person_id FROM identity_links WHERE identity_id = NEW.identity_id);\nEND;" + ] } ] diff --git a/src/store/sqlite/people-list.ts b/src/store/sqlite/people-list.ts index 3b04a2e0a..131cddc7e 100644 --- a/src/store/sqlite/people-list.ts +++ b/src/store/sqlite/people-list.ts @@ -18,6 +18,7 @@ import { type CacheDatabase, isQueryOnly, type SqlValue } from "../driver.js" import { fold } from "../normalize.js" import { mergedAwaySql } from "./merged-persons.js" import { ALWAYS_SHOWN, type ShownBecause, shownReasons } from "./person-ties.js" +import { type HeldBot, ownerPeopleOf, ruleMove, SENDER_BOT_PREFIX, senderBotsOf } from "./sender-bots.js" import { type Reach, type SenderSignal, senderSignalsOf, sentMailOf } from "./sender-signals.js" import { mergedAssignees } from "./task-board.js" import { hiddenTestPeople } from "./test-people.js" @@ -62,8 +63,13 @@ export interface ListedPerson { messagesFrom: number /** The newest of their messages, their mail and their one-to-one chat's last message, as ISO time. */ lastContact: string | null - /** Why they are shown; empty for someone hidden by default. */ + /** Why they are shown; empty for someone hidden by default, and for a bot. */ ties: ShownBecause[] + /** + * The sender bot this row is (`sender-bot:`), listed as `automated` under its person row's ref; `null` for a + * person. + */ + bot: string | null /** How their messages reached the owner (`senderSignalsOf`); `null` when nothing says. Worked out for the page. */ reach: Reach | null /** What their mail and addresses show about who writes and how it reached the owner. Worked out for the page. */ @@ -180,6 +186,9 @@ interface Facts { twoWay: boolean /** Messages its identities wrote. */ messages: number + identities: number + /** Identities a program holds by their own mark: the platform's bot flag, a no-reply or notification address. */ + programIdentities: number } const perIdentity = (database: CacheDatabase, sql: string, params: SqlValue[]): Map => @@ -231,6 +240,8 @@ const factsOf = (database: CacheDatabase, scope: Scope): Map => { organization: false, twoWay: false, messages: 0, + identities: held.length, + programIdentities: 0, } const source = (row: Record) => ({ provider: String(row.provider), @@ -250,6 +261,8 @@ const factsOf = (database: CacheDatabase, scope: Scope): Map => { one.organization ||= owned.has(identity) one.twoWay ||= twoWay.has(identity) one.messages += messages.get(identity) ?? 0 + if (Number(row.bot) === 1 || (email !== null && (isNoReplyAddress(email) || isNotificationAddress(email)))) + one.programIdentities += 1 } const contact = noFallbacks() // Stable: equal counts keep the identities' stored order. @@ -291,6 +304,8 @@ interface Candidate { interface Classified extends Omit { id: number + /** What the rules do with this person when the kind is kept: make them a bot, or a rule's bot a person again. */ + move?: "bot" | "person" /** Worked out once: a collator over 50,000 names takes most of a list's time. */ nameOrder: string emails: string[] @@ -308,6 +323,19 @@ interface MailCounts { /** One misfiled letter is no newsletter. */ const BULK_MIN = 3 +/** A program writes: enough to move a sender to a bot. A name or a bulk mailbox alone may be a human's newsletter. */ +const PROGRAM_SIGNALS: readonly KindSignal[] = [ + "bot", + "no-reply", + "notification-address", + "auto-submitted", + "null-return-path", + "bulk-never-replied", +] + +/** What the owner decided for this person: a bot of the owner's, or a person no rule makes a bot. */ +type Held = "bot" | "person" | undefined + /** The first rule that holds; the list's contract in the people-clients-digests plan names the same order. */ const kindOf = ( shown: string | null, @@ -315,10 +343,9 @@ const kindOf = ( ties: ShownBecause[], mail: MailCounts | undefined, test: boolean, + held?: Held, ): { kind: PersonKind; signals: (ShownBecause | KindSignal)[] } => { if (test) return { kind: "test", signals: ["test-data"] } - const always = ties.filter((tie) => (ALWAYS_SHOWN as readonly string[]).includes(tie)) - if (always.length > 0) return { kind: "person", signals: ties } const emails = facts?.emails ?? [] const automated: KindSignal[] = [ ...(facts?.bot ? (["bot"] as const) : []), @@ -333,8 +360,12 @@ const kindOf = ( ? (["null-return-path"] as const) : []), ] + if (held === "bot") return { kind: "automated", signals: automated.length > 0 ? automated : ["owner-choice"] } + const always = ties.filter((tie) => (ALWAYS_SHOWN as readonly string[]).includes(tie)) + if (always.length > 0) return { kind: "person", signals: ties } // One mailbox's newsletter signal must not hide someone the owner talks to in a private chat. - if (automated.length > 0 && (facts?.bot || !facts?.twoWay)) return { kind: "automated", signals: automated } + if (held !== "person" && automated.length > 0 && (facts?.bot || !facts?.twoWay)) + return { kind: "automated", signals: automated } const organization: KindSignal[] = [ ...(facts?.organization ? (["organization"] as const) : []), ...(emails.length > 0 && emails.every((one) => isRoleAddress(one) && !isPersonLikeRoleAddress(one)) @@ -348,6 +379,24 @@ const kindOf = ( return { kind: "person", signals: ties } } +/** + * A program's signal the owner never wrote against, on a person whose every identity is the program's: a person who + * also has a human's identity linked stays a person with the mark. + */ +const isProgram = ( + { kind, signals }: { kind: PersonKind; signals: (ShownBecause | KindSignal)[] }, + facts: Facts | undefined, + ties: ShownBecause[], +): boolean => + kind === "automated" && + facts !== undefined && + signals.some((signal) => (PROGRAM_SIGNALS as readonly string[]).includes(signal)) && + (facts.bot || (!facts.twoWay && !ties.includes("mail"))) && + (facts.identities === 1 || facts.programIdentities === facts.identities) + +const moveOf = (bot: HeldBot | undefined, program: boolean): Classified["move"] => + bot === undefined ? (program ? "bot" : undefined) : bot.author === "rules" && !program ? "person" : undefined + /** Each person with their kind, contact and counts; the last contact is added for the page alone. */ const classified = ( database: CacheDatabase, @@ -357,6 +406,8 @@ const classified = ( ): Classified[] => { const facts = factsOf(database, scope) const test = hiddenTestPeople(database) + const bots = senderBotsOf(database) + const ownerPeople = ownerPeopleOf(database) const tasks = countsOf(database, TASK_COUNTS, mergedAssignees(database)) const mail = new Map( database @@ -372,15 +423,22 @@ const classified = ( const contact = { username: own?.username ?? null, phone: own?.phone ?? null, email: own?.email ?? null } const shown = displayName(name, { ...contact, name: own?.name ?? null }) const ties = reasons.get(id) ?? [] - const { kind, signals } = kindOf(shown, own, ties, mail.get(id), test.has(id)) + const bot = bots.get(id) + const held: Held = bot?.author === "owner" ? "bot" : ownerPeople.has(id) && bot === undefined ? "person" : undefined + const worked = kindOf(shown, own, ties, mail.get(id), test.has(id), held) + const move = + held === undefined && !owner && worked.kind !== "test" ? moveOf(bot, isProgram(worked, own, ties)) : undefined + const isBot = (bot !== undefined && move !== "person") || move === "bot" + const named = bot?.name ?? shown return { id, - nameOrder: nameOrderOf(shown), + ...(move === undefined ? {} : { move }), + nameOrder: nameOrderOf(named), person: `person:${id}`, name, - displayName: shown, - kind, - kindSignals: signals, + displayName: named, + kind: worked.kind, + kindSignals: worked.signals, owner, tasks: tasks.get(id) ?? 0, contact: @@ -388,7 +446,8 @@ const classified = ( ...contact, usernameSource: own?.usernameSource ?? null, messagesFrom: (own?.messages ?? 0) + (mail.get(id)?.n ?? 0), - ties, + ties: isBot ? [] : ties, + bot: bot !== undefined && move !== "person" ? `${SENDER_BOT_PREFIX}${bot.id}` : null, emails: own?.emails ?? [], twoWay: own?.twoWay ?? false, } @@ -410,7 +469,7 @@ const withLastContact = ( database, people.map(({ id }) => id), ) - return people.map(({ id, nameOrder: _, emails, twoWay, ...person }) => { + return people.map(({ id, nameOrder: _, emails, twoWay, move: __, ...person }) => { const time = at.get(id) const { ties } = person return { @@ -435,7 +494,7 @@ const byName = (a: Classified, b: Classified) => * Bump when what decides a kind, a name's order or a count changes in code (the word lists, `BULK_MIN`, the ties): * every stored one is worked out again on the next list. */ -const KIND_RULES = "6" +const KIND_RULES = "7" const RULES_KEY = "people.kind_rules" /** Past this many people to work out, one pass over everyone beats a lookup per person. */ const WHOLE_PASS = 20_000 @@ -487,6 +546,11 @@ const workOut = (database: CacheDatabase, all: boolean, most?: number): Worked[] } const keep = (database: CacheDatabase, worked: Worked[]): void => { + const at = Date.now() + // Before the kinds: a move clears the person's kind through its triggers. + for (const person of worked) + if (person.move !== undefined && person.kind !== MERGED) + ruleMove(database, person.id, person.move, person.kindSignals.join(", "), at) const row = database.prepare( "UPDATE persons SET kind = ?, name_order = ?, messages_from = ?, task_count = ?, last_contact = ? WHERE id = ?", ) @@ -728,7 +792,9 @@ export const similarPeople = (database: CacheDatabase, typed: string, limit: num })) const byId = new Map(people.map((person) => [person.id, person])) const ordered = [...sameName.keys()].flatMap((id) => byId.get(id) ?? []) - const rows = classified(database, ordered, [...sameName.keys()], ties).filter(({ kind }) => kind !== "test") + const rows = classified(database, ordered, [...sameName.keys()], ties).filter( + ({ kind, bot }) => kind !== "test" && bot === null, + ) const same = rows.map(({ id }) => sameName.get(id) === true) return withLastContact(database, rows).map((person, at) => ({ ...person, sameName: same[at] === true })) } diff --git a/src/store/sqlite/person-match-scan.ts b/src/store/sqlite/person-match-scan.ts index eb0ccd62c..59b879fd9 100644 --- a/src/store/sqlite/person-match-scan.ts +++ b/src/store/sqlite/person-match-scan.ts @@ -283,7 +283,7 @@ const join = ( result.skipped.push({ persons: [String(from), String(into)], signal: method, reason: "identity.separated" }) return into } - if (touchesOwner(pass, from, into, method)) return into + if (touchesOwner(pass, from, into, method) || touchesBot(pass, from, into, method)) return into if (index.rejected(from, into) !== undefined) { propose(pass, { identity: sides.identity, @@ -313,9 +313,18 @@ const touchesOwner = ({ context, result }: Pass, from: number, to: number, signa return true } +/** A sender bot is never proposed as the same person, by any signal; the owner moves it by hand. */ +const touchesBot = ({ context, result }: Pass, from: number, to: number, signal: string): boolean => { + const held = context.database.prepare("SELECT 1 FROM sender_bots WHERE person_id IN (?, ?) LIMIT 1").get(from, to) + if (held === undefined) return false + result.skipped.push({ persons: [String(from), String(to)], signal, reason: "identity.not-a-person" }) + return true +} + const propose = (pass: Pass, opening: Omit) => { const { context, index, result } = pass if (touchesOwner(pass, opening.from, opening.to, opening.signal)) return + if (touchesBot(pass, opening.from, opening.to, opening.signal)) return const opened = openIdentityLink(context, { ...opening, by: RULE }, index) const persons: [string, string] = [String(opening.from), String(opening.to)] if (opened.outcome === "skipped") { diff --git a/src/store/sqlite/schema.ts b/src/store/sqlite/schema.ts index 84dc1140d..5def7c042 100644 --- a/src/store/sqlite/schema.ts +++ b/src/store/sqlite/schema.ts @@ -362,6 +362,8 @@ export const bots = sqliteTable( ], ) +export { senderBotMoves, senderBots } from "./schema/sender-bots.js" + export const chats = sqliteTable( "chats", { @@ -863,6 +865,9 @@ export const emails = sqliteTable( unique().on(table.accountId, table.externalId), index("emails_by_time").on(table.accountId, desc(table.sentAt)), index("emails_by_mail_rule_id").on(table.mailRuleId).where(sql`mail_rule_id IS NOT NULL`), + index("emails_by_list_id").on( + sql`coalesce(json_extract(headers, '$."list-id"'), json_extract(metadata, '$.listId'))`, + ), index("emails_by_email_thread_id").on(table.emailThreadId), index("emails_by_from_identity_id").on(table.fromIdentityId), check("emails_references_json", sql`"references" IS NULL OR json_valid("references")`), diff --git a/src/store/sqlite/schema/sender-bots.ts b/src/store/sqlite/schema/sender-bots.ts new file mode 100644 index 000000000..9b60d92ba --- /dev/null +++ b/src/store/sqlite/schema/sender-bots.ts @@ -0,0 +1,28 @@ +import { index, integer, sqliteTable, text } from "../drizzle/core.js" + +export const senderBots = sqliteTable("sender_bots", { + id: integer("id").primaryKey({ autoIncrement: true }), + personId: integer("person_id").notNull().unique(), + name: text("name"), + organizationId: integer("organization_id"), + author: text("author").notNull(), + reason: text("reason"), + createdAt: integer("created_at").notNull(), + updatedAt: integer("updated_at").notNull(), +}) + +export const senderBotMoves = sqliteTable( + "sender_bot_moves", + { + id: integer("id").primaryKey({ autoIncrement: true }), + identityId: integer("identity_id").notNull(), + fromPersonId: integer("from_person_id"), + fromBotId: integer("from_bot_id"), + toPersonId: integer("to_person_id"), + toBotId: integer("to_bot_id"), + author: text("author").notNull(), + reason: text("reason"), + createdAt: integer("created_at").notNull(), + }, + (table) => [index("sender_bot_moves_by_identity_id").on(table.identityId)], +) diff --git a/src/store/sqlite/sender-bots.ts b/src/store/sqlite/sender-bots.ts new file mode 100644 index 000000000..662b89992 --- /dev/null +++ b/src/store/sqlite/sender-bots.ts @@ -0,0 +1,259 @@ +import { CliError } from "@wirecat/cli-base" +import type { CacheDatabase } from "../driver.js" +import type { IdentityRef, PersonRecord } from "../types.js" +import { currentPerson } from "./merged-persons.js" +import type { StoreContext } from "./open.js" +import { isOwner, mergePerson, move, recordOf, renameAfterLeaving, required, unlinkIdentity } from "./person-links.js" +import { write } from "./transaction.js" + +export const SENDER_BOT_PREFIX = "sender-bot:" + +export type BotAuthor = "rules" | "owner" + +/** A sender bot as the people list reads it, keyed by the person row whose identities are the bot's. */ +export interface HeldBot { + id: number + author: BotAuthor + name: string | null +} + +export interface SenderBot { + bot: string + /** The person row whose identities are the bot's: its handle in `people list` and `people show`. */ + person: string + name: string | null + author: BotAuthor + reason: string | null +} + +export const senderBotsOf = (database: CacheDatabase): Map => + new Map( + database + .prepare("SELECT id, person_id, author, name FROM sender_bots") + .all() + .map((row) => [ + Number(row.person_id), + { id: Number(row.id), author: row.author as BotAuthor, name: row.name == null ? null : String(row.name) }, + ]), + ) + +/** People holding an identity the owner last moved to a person, or kept as one: no rule makes them a bot. */ +export const ownerPeopleOf = (database: CacheDatabase): Set => + new Set( + database + .prepare( + "SELECT DISTINCT l.person_id AS person FROM sender_bot_moves m JOIN identity_links l ON l.identity_id = m.identity_id " + + "WHERE m.author = 'owner' AND m.to_bot_id IS NULL " + + "AND m.id = (SELECT max(id) FROM sender_bot_moves WHERE identity_id = m.identity_id)", + ) + .all() + .map((row) => Number(row.person)), + ) + +export const refuseBotAssignee = (database: CacheDatabase, person: number): void => { + if (database.prepare("SELECT 1 FROM sender_bots WHERE person_id = ?").get(person) !== undefined) + throw new CliError("validation_error", `person:${person} is a sender bot, which is no one's assignee`, { + reason: "sender-bot.assignee", + }) +} + +const identitiesOf = (database: CacheDatabase, person: number): number[] => + database + .prepare("SELECT identity_id FROM identity_links WHERE person_id = ? ORDER BY identity_id") + .all(person) + .map((row) => Number(row.identity_id)) + +interface Side { + person?: number + bot?: number +} + +const logMoves = ( + database: CacheDatabase, + identities: readonly number[], + from: Side, + to: Side, + { author, reason, at }: { author: BotAuthor; reason: string | null; at: number }, +) => { + const row = database.prepare( + "INSERT INTO sender_bot_moves (identity_id, from_person_id, from_bot_id, to_person_id, to_bot_id, author, reason, " + + "created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", + ) + for (const identity of identities) + row.run(identity, from.person ?? null, from.bot ?? null, to.person ?? null, to.bot ?? null, author, reason, at) +} + +const createBot = ( + database: CacheDatabase, + person: number, + { author, reason, at, name = null }: { author: BotAuthor; reason: string | null; at: number; name?: string | null }, +): number => + Number( + database + .prepare( + "INSERT INTO sender_bots (person_id, name, author, reason, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?) " + + "RETURNING id", + ) + .get(person, name, author, reason, at, at)?.id, + ) + +/** A rule's move of a whole person to a bot, or of a rule's bot back to a person; the caller holds the write lock. */ +export const ruleMove = ( + database: CacheDatabase, + person: number, + to: "bot" | "person", + reason: string, + at: number, +): void => { + const identities = identitiesOf(database, person) + const options = { author: "rules" as const, reason, at } + if (to === "bot") { + const bot = createBot(database, person, options) + logMoves(database, identities, { person }, { bot }, options) + return + } + const held = database.prepare("SELECT id FROM sender_bots WHERE person_id = ? AND author = 'rules'").get(person) + if (held === undefined) return + database.prepare("DELETE FROM sender_bots WHERE id = ?").run(Number(held.id)) + logMoves(database, identities, { bot: Number(held.id) }, { person }, options) +} + +const botRow = (database: CacheDatabase, ref: string) => { + const id = ref.startsWith(SENDER_BOT_PREFIX) ? ref.slice(SENDER_BOT_PREFIX.length) : "" + const row = /^[1-9]\d*$/.test(id) + ? database.prepare("SELECT id, person_id FROM sender_bots WHERE id = ?").get(Number(id)) + : undefined + if (row === undefined) + throw new CliError("not_found", `no ${ref} in the store`, { reason: "sender-bot.not-found", reference: ref }) + return { id: Number(row.id), person: Number(row.person_id) } +} + +const botOfPerson = (database: CacheDatabase, person: number): number | undefined => { + const row = database.prepare("SELECT id FROM sender_bots WHERE person_id = ?").get(person) + return row === undefined ? undefined : Number(row.id) +} + +const personRow = (database: CacheDatabase, ref: string): number => { + const uid = ref.startsWith("person:") ? ref.slice("person:".length) : "" + const found = /^[1-9]\d*$/.test(uid) ? database.prepare("SELECT id FROM persons WHERE id = ?").get(uid) : undefined + if (found === undefined) throw new CliError("not_found", `no ${ref} in the store`, { reference: ref }) + return currentPerson(database, Number(found.id)) +} + +/** What a move names: a whole person or bot, or one identity and the person it sits on. */ +const subjectOf = (context: StoreContext, subject: string | IdentityRef) => { + const { database } = context + if (typeof subject !== "string") { + const found = required(context, subject) + const alone = identitiesOf(database, found.personPk).length === 1 + return alone ? { person: found.personPk } : { person: found.personPk, identity: found.pk, ref: subject } + } + if (subject.startsWith(SENDER_BOT_PREFIX)) return { person: botRow(database, subject).person } + return { person: personRow(database, subject) } +} + +const senderBotOf = (database: CacheDatabase, id: number): SenderBot => { + const row = database.prepare("SELECT person_id, name, author, reason FROM sender_bots WHERE id = ?").get(id) + return { + bot: `${SENDER_BOT_PREFIX}${id}`, + person: `person:${Number(row?.person_id)}`, + name: row?.name == null ? null : String(row.name), + author: row?.author as BotAuthor, + reason: row?.reason == null ? null : String(row.reason), + } +} + +/** + * The owner's word that a person, or one of their identities, is a program, for its whole history: its messages stay + * where they are, and no rule moves it back. `bot` joins it to a bot already stored; one identity of a person with + * others gets a person row of its own first. + */ +export const moveToBot = ( + context: StoreContext, + subject: string | IdentityRef, + options: { bot?: string; name?: string; reason?: string } = {}, +): SenderBot => { + const { database } = context + return write(database, () => { + const at = context.now() + const log = { author: "owner" as const, reason: options.reason ?? null, at } + const chosen = subjectOf(context, subject) + if (isOwner(context, chosen.person)) + throw new CliError("validation_error", "the owner's own person is never a bot", { reason: "sender-bot.owner" }) + const target = options.bot === undefined ? undefined : botRow(database, options.bot) + const from = { person: chosen.person, bot: botOfPerson(database, chosen.person) } + const claim = (bot: number) => + database + .prepare("UPDATE sender_bots SET author = 'owner', name = coalesce(?, name), updated_at = ? WHERE id = ?") + .run(options.name ?? null, at, bot) + if (target !== undefined && target.person !== chosen.person) { + const moving = chosen.identity === undefined ? identitiesOf(database, chosen.person) : [chosen.identity] + if (chosen.identity === undefined) { + mergePerson(context, chosen.person, target.person, { method: "bot", by: "owner" }) + if (from.bot !== undefined) database.prepare("DELETE FROM sender_bots WHERE id = ?").run(from.bot) + } else { + move(context, chosen.identity, chosen.person, target.person, { method: "bot", by: "owner" }) + renameAfterLeaving(context, chosen.person, [chosen.identity]) + } + claim(target.id) + logMoves(database, moving, from, { bot: target.id }, log) + return senderBotOf(database, target.id) + } + if (chosen.identity !== undefined && chosen.ref !== undefined) { + const alone = Number(unlinkIdentity(context, chosen.ref, { method: "unlink", by: "owner" }).uid) + const bot = createBot(database, alone, { ...log, name: options.name ?? null }) + logMoves(database, [chosen.identity], from, { bot }, log) + return senderBotOf(database, bot) + } + const held = from.bot ?? createBot(database, chosen.person, { ...log, name: options.name ?? null }) + if (from.bot !== undefined) claim(held) + logMoves(database, identitiesOf(database, chosen.person), from, { bot: held }, log) + return senderBotOf(database, held) + }) +} + +/** + * The owner's word that a bot, a person or one identity is a person, for its whole history; no rule makes it a bot + * again. `person` joins it to that person; one identity of a bot with others gets a person row of its own. + */ +export const moveToPerson = ( + context: StoreContext, + subject: string | IdentityRef, + options: { person?: string; reason?: string } = {}, +): PersonRecord => { + const { database } = context + return write(database, () => { + const at = context.now() + const log = { author: "owner" as const, reason: options.reason ?? null, at } + const chosen = subjectOf(context, subject) + const bot = botOfPerson(database, chosen.person) + const from = { person: chosen.person, bot } + const target = options.person === undefined ? undefined : personRow(database, options.person) + if (target !== undefined && botOfPerson(database, target) !== undefined) + throw new CliError("validation_error", `${options.person} is a bot; name a person`, { + reason: "sender-bot.not-a-person", + reference: options.person, + }) + if (target !== undefined && target !== chosen.person) { + const moving = chosen.identity === undefined ? identitiesOf(database, chosen.person) : [chosen.identity] + if (chosen.identity === undefined) mergePerson(context, chosen.person, target, { method: "manual", by: "owner" }) + else { + move(context, chosen.identity, chosen.person, target, { method: "manual", by: "owner" }) + renameAfterLeaving(context, chosen.person, [chosen.identity]) + } + if (bot !== undefined && identitiesOf(database, chosen.person).length === 0) + database.prepare("DELETE FROM sender_bots WHERE id = ?").run(bot) + logMoves(database, moving, from, { person: target }, log) + return recordOf(context, target) + } + if (chosen.identity !== undefined && chosen.ref !== undefined && bot !== undefined) { + const alone = Number(unlinkIdentity(context, chosen.ref, { method: "unlink", by: "owner" }).uid) + logMoves(database, [chosen.identity], from, { person: alone }, log) + return recordOf(context, alone) + } + if (bot !== undefined) database.prepare("DELETE FROM sender_bots WHERE id = ?").run(bot) + const moving = chosen.identity === undefined ? identitiesOf(database, chosen.person) : [chosen.identity] + logMoves(database, moving, from, { person: chosen.person }, log) + return recordOf(context, chosen.person) + }) +} diff --git a/src/store/sqlite/sender-signals.ts b/src/store/sqlite/sender-signals.ts index 87ad4f236..ab6e2f1af 100644 --- a/src/store/sqlite/sender-signals.ts +++ b/src/store/sqlite/sender-signals.ts @@ -84,11 +84,16 @@ export const senderSignalsOf = ( const LIST_ID = "coalesce(json_extract(e.headers, '$.\"list-id\"'), json_extract(e.metadata, '$.listId'))" /** `bob+news@x` and `bob@x` are one sender. */ +/** The senders of each of these List-Ids, through `emails_by_list_id`. */ +export const LIST_SENDERS = + `SELECT DISTINCT ${LIST_ID} AS list, e.from_address AS address FROM emails e ` + + `WHERE e.from_address IS NOT NULL AND ${LIST_ID} IN (SELECT value FROM json_each(?))` + const senderKey = (address: string) => address.toLowerCase().replace(/\+[^@]*@/, "@") /** - * The mail each of these people sent the owner, as `senderSignalsOf` reads it. Asked for a page of people only: it - * reads every stored email's List-Id once to tell a discussion list from a newsletter. + * The mail each of these people sent the owner, as `senderSignalsOf` reads it. Asked for a page of people only: the + * senders of their List-Ids tell a discussion list from a newsletter. */ export const sentMailOf = (database: CacheDatabase, people: readonly number[]): Map => { const found = new Map() @@ -111,12 +116,7 @@ export const sentMailOf = (database: CacheDatabase, people: readonly number[]): const lists = [...new Set(rows.flatMap((row) => (typeof row.list === "string" ? [row.list] : [])))] const senders = new Map>() if (lists.length > 0) - for (const row of database - .prepare( - `SELECT DISTINCT ${LIST_ID} AS list, e.from_address AS address FROM emails e ` + - `WHERE e.from_address IS NOT NULL AND ${LIST_ID} IN (SELECT value FROM json_each(?))`, - ) - .all(JSON.stringify(lists))) { + for (const row of database.prepare(LIST_SENDERS).all(JSON.stringify(lists))) { const list = String(row.list) const held = senders.get(list) ?? new Set() held.add(senderKey(String(row.address))) diff --git a/src/store/sqlite/work-tasks.ts b/src/store/sqlite/work-tasks.ts index b731136be..dd6d81db7 100644 --- a/src/store/sqlite/work-tasks.ts +++ b/src/store/sqlite/work-tasks.ts @@ -27,6 +27,7 @@ import { requiredThing } from "./notes.js" import type { StoreContext } from "./open.js" import { queryFilter, type Where } from "./query-filter.js" import { pageOfRows } from "./rows-page.js" +import { refuseBotAssignee } from "./sender-bots.js" import { stemmerCache } from "./stems.js" import { BOARD_SCOPE, @@ -741,6 +742,7 @@ export const workTaskOperationsOver = (context: StoreContext): WorkTaskOperation write(database, () => { checkRevision(rowById(task), check.revision) const person = personOf(to) + refuseBotAssignee(database, person) const held = database .prepare( "SELECT 1 FROM task_assignments WHERE task_id = ? AND assignee_type = 'person' " + diff --git a/src/store/version-73.test.ts b/src/store/version-73.test.ts index 8d91b7286..74b7ae890 100644 --- a/src/store/version-73.test.ts +++ b/src/store/version-73.test.ts @@ -59,7 +59,7 @@ describe("store version 73", () => { it("**never hands an id out twice**: every base table counts on past the largest id the store knows", async () => { const { path, database } = await fileAt72() const before = objects(database) - migrate(database, { now: () => 2, rollback: { store: path, freeBytes: plenty } }) + migrate(database, { migrations: upTo(73), now: () => 2, rollback: { store: path, freeBytes: plenty } }) expect(version(database)).toEqual({ version: 73, min_compatible: 73 }) const plain = database @@ -131,10 +131,18 @@ describe("store version 73", () => { }) const dir = mkdtempSync(join(tmpdir(), "version-73-")) const created = await openCache(join(dir, "new.db")) - migrate(created, { now: () => 1, rollback: { store: join(dir, "new.db"), freeBytes: plenty } }) + migrate(created, { + migrations: upTo(73), + now: () => 1, + rollback: { store: join(dir, "new.db"), freeBytes: plenty }, + }) const copied = await openCache(join(dir, "copied.db")) migrate(copied, { migrations: upTo(72), now: () => 1 }) - migrate(copied, { now: () => 1, rollback: { store: join(dir, "copied.db"), freeBytes: plenty } }) + migrate(copied, { + migrations: upTo(73), + now: () => 1, + rollback: { store: join(dir, "copied.db"), freeBytes: plenty }, + }) const declared = (database: CacheDatabase) => String(database.prepare("SELECT sql FROM sqlite_master WHERE name = 'accounts'").get()?.sql).split("(")[0] @@ -149,7 +157,7 @@ describe("store version 73", () => { it("leaves another tool's tables, rows, counters and triggers as they were", async () => { const { path, database } = await fileAt72() const sql = database.prepare("SELECT sql FROM sqlite_master WHERE name = 'other_tool_items'").get()?.sql - migrate(database, { now: () => 2, rollback: { store: path, freeBytes: plenty } }) + migrate(database, { migrations: upTo(73), now: () => 2, rollback: { store: path, freeBytes: plenty } }) expect(database.prepare("SELECT sql FROM sqlite_master WHERE name = 'other_tool_items'").get()?.sql).toBe(sql) expect(database.prepare("SELECT id, person_id, note FROM other_tool_items ORDER BY id").all()).toEqual([ @@ -164,7 +172,7 @@ describe("store version 73", () => { it("is refused by a build that speaks 72", async () => { const { path, database } = await fileAt72() - migrate(database, { now: () => 2, rollback: { store: path, freeBytes: plenty } }) + migrate(database, { migrations: upTo(73), now: () => 2, rollback: { store: path, freeBytes: plenty } }) database.close() const old = await openCache(path) @@ -179,13 +187,13 @@ describe("store version 73", () => { const warnings: string[] = [] const short = { store: path, freeBytes: () => 1024, warn: (line: string) => warnings.push(line) } - expect(() => migrate(database, { now: () => 2, rollback: short })).toThrow( + expect(() => migrate(database, { migrations: upTo(73), now: () => 2, rollback: short })).toThrow( expect.objectContaining({ details: expect.objectContaining({ reason: "store.no-rollback-copy" }) }), ) expect(version(database)).toEqual({ version: 72, min_compatible: 56 }) expect(Number(database.prepare("PRAGMA foreign_keys").get()?.foreign_keys)).toBe(1) - migrate(database, { now: () => 2, rollback: { ...short, withoutCopy: true } }) + migrate(database, { migrations: upTo(73), now: () => 2, rollback: { ...short, withoutCopy: true } }) expect(version(database)).toEqual({ version: 73, min_compatible: 73 }) expect(warnings).toEqual([expect.stringContaining("migrating without one")]) database.close() @@ -205,16 +213,24 @@ describe("store version 73", () => { const headroom = 256 * 1024 * 1024 const enoughForTheCopyOnly = () => headroom + copy * 2 expect(() => - migrate(database, { now: () => 2, rollback: { store: path, freeBytes: enoughForTheCopyOnly } }), + migrate(database, { + migrations: upTo(73), + now: () => 2, + rollback: { store: path, freeBytes: enoughForTheCopyOnly }, + }), ).toThrow(/not enough free disk space/) - migrate(database, { now: () => 2, rollback: { store: path, freeBytes: () => headroom + copy * 3 } }) + migrate(database, { + migrations: upTo(73), + now: () => 2, + rollback: { store: path, freeBytes: () => headroom + copy * 3 }, + }) expect(version(database)).toEqual({ version: 73, min_compatible: 73 }) database.close() }) it("takes the rollback copy of every table it copies", async () => { const { dir, path, database } = await fileAt72() - migrate(database, { now: () => 2, rollback: { store: path, freeBytes: plenty } }) + migrate(database, { migrations: upTo(73), now: () => 2, rollback: { store: path, freeBytes: plenty } }) database.close() const [copy] = readdirSync(join(dir, "backups")) const saved = await openCache(join(dir, "backups", String(copy))) @@ -229,7 +245,7 @@ describe("store version 73", () => { it("**goes back to 72 from its rollback copy**, and up to 73 again", async () => { const { dir, path, database } = await fileAt72() const rows = database.prepare("SELECT id, text FROM messages ORDER BY id").all() - migrate(database, { now: () => 2, rollback: { store: path, freeBytes: plenty } }) + migrate(database, { migrations: upTo(73), now: () => 2, rollback: { store: path, freeBytes: plenty } }) database.exec( "INSERT INTO organizations (kind, name, scope, created_at, updated_at) VALUES ('company', 'New', 'work', 3, 3)", ) @@ -244,7 +260,7 @@ describe("store version 73", () => { expect(database.prepare("SELECT id, text FROM messages ORDER BY id").all()).toEqual(rows) expect(database.prepare("SELECT id FROM organizations ORDER BY id").all()).toEqual([{ id: 10 }]) - migrate(database, { now: () => 4, rollback: { store: path, freeBytes: plenty } }) + migrate(database, { migrations: upTo(73), now: () => 4, rollback: { store: path, freeBytes: plenty } }) expect(version(database)).toEqual({ version: 73, min_compatible: 73 }) // Organization 3767 was handed out before the rollback; it is not handed out again. expect(sequence(database, "organizations")).toBe(3767 + 1000) @@ -255,7 +271,11 @@ describe("store version 73", () => { it("keeps text that is not JSON as a JSON string, and says so", async () => { const { path, database } = await fileAt72() database.exec("UPDATE messages SET metadata = '{truncated' WHERE id = 40") - const notice = migrate(database, { now: () => 2, rollback: { store: path, freeBytes: plenty } }) + const notice = migrate(database, { + migrations: upTo(73), + now: () => 2, + rollback: { store: path, freeBytes: plenty }, + }) expect(notice).toContain("messages.metadata held text that is not JSON in 1 row (40)") expect(database.prepare("SELECT metadata FROM messages WHERE id = 40").get()?.metadata).toBe('"{truncated"') @@ -273,9 +293,9 @@ describe("store version 73", () => { it("refuses rows a new rule cannot repair, naming them, and changes nothing", async () => { const { path, database } = await fileAt72() database.exec("UPDATE facts SET confirmed_by_type = 'person', confirmed_by_id = NULL") - expect(() => migrate(database, { now: () => 2, rollback: { store: path, freeBytes: plenty } })).toThrow( - /facts rows 1 break facts_confirmed_by_pair/, - ) + expect(() => + migrate(database, { migrations: upTo(73), now: () => 2, rollback: { store: path, freeBytes: plenty } }), + ).toThrow(/facts rows 1 break facts_confirmed_by_pair/) expect(version(database)).toEqual({ version: 72, min_compatible: 56 }) expect(database.prepare("SELECT sql FROM sqlite_master WHERE name = 'facts'").get()?.sql).not.toContain( "AUTOINCREMENT", @@ -286,9 +306,9 @@ describe("store version 73", () => { it("refuses a table that holds a column the copy would lose", async () => { const { path, database } = await fileAt72() database.exec("ALTER TABLE persons ADD COLUMN other_tool_flag INTEGER") - expect(() => migrate(database, { now: () => 2, rollback: { store: path, freeBytes: plenty } })).toThrow( - /copies persons without its columns other_tool_flag/, - ) + expect(() => + migrate(database, { migrations: upTo(73), now: () => 2, rollback: { store: path, freeBytes: plenty } }), + ).toThrow(/copies persons without its columns other_tool_flag/) expect(version(database)).toEqual({ version: 72, min_compatible: 56 }) database.close() }) @@ -299,7 +319,11 @@ describe("store version 73", () => { database.exec(`INSERT INTO chats (id, account_id, external_id, kind, title, created_at, updated_at) VALUES (2, 99, '8', 'group', 'Gone account', 0, 0), (3, 'message', '9', 'group', 'Shifted columns', 0, 0)`) database.exec("PRAGMA foreign_keys = ON") - const notice = migrate(database, { now: () => 2, rollback: { store: path, freeBytes: plenty } }) + const notice = migrate(database, { + migrations: upTo(73), + now: () => 2, + rollback: { store: path, freeBytes: plenty }, + }) expect(version(database)).toEqual({ version: 73, min_compatible: 73 }) expect(notice).toContain("already pointed at rows that do not exist, and are kept as they were") @@ -402,9 +426,9 @@ describe("store version 73", () => { mkdirSync(join(dir, "backups"), { recursive: true }) writeFileSync(join(dir, "backups", "wirecat-rollback-schema-60-older.db"), "") database.exec("UPDATE facts SET confirmed_by_type = 'person', confirmed_by_id = NULL") - expect(() => migrate(database, { now: () => 2, rollback: { store: path, freeBytes: plenty } })).toThrow( - /break facts_confirmed_by_pair/, - ) + expect(() => + migrate(database, { migrations: upTo(73), now: () => 2, rollback: { store: path, freeBytes: plenty } }), + ).toThrow(/break facts_confirmed_by_pair/) expect(readdirSync(join(dir, "backups"))).toEqual(["wirecat-rollback-schema-60-older.db"]) database.close() }) diff --git a/src/testing/older-store.ts b/src/testing/older-store.ts index 88b1691d8..04f63de21 100644 --- a/src/testing/older-store.ts +++ b/src/testing/older-store.ts @@ -3,6 +3,12 @@ import { VERSION_72_TABLES as VERSION_72 } from "./version-72-tables.js" // What a migration created that replaying it would create again; a migration that only updates rows needs nothing. const UNDO: Record = { + 74: + "DROP TRIGGER sender_bots_person_ad; DROP TRIGGER sender_bots_organization_ad; " + + "DROP TRIGGER sender_bot_moves_identity_ad; DROP TRIGGER person_kind_sender_bot_ai; " + + "DROP TRIGGER person_kind_sender_bot_ad; DROP TRIGGER person_kind_sender_bot_au; " + + "DROP TRIGGER person_kind_sender_bot_move_ai; DROP INDEX emails_by_list_id; DROP TABLE sender_bot_moves; " + + "DROP TABLE sender_bots;", 72: "DROP TRIGGER document_changes_account_bd; DROP TABLE document_changes; " + "ALTER TABLE document_revisions DROP COLUMN title; ALTER TABLE document_revisions DROP COLUMN front_matter; " +